summaryrefslogtreecommitdiff
path: root/tests/micropython/viper_large_jump.py
blob: 1c5913dec1ea273b0473af835791fbfb5591b84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
COUNT = 600


try:
    code = """
@micropython.viper
def f() -> int:
    x = 0
    while x < 10:
"""
    for i in range(COUNT):
        code += "        x += 1\n"
    code += "    return x"
    exec(code)
except MemoryError:
    print("SKIP-TOO-LARGE")
    raise SystemExit


print(f())