summaryrefslogtreecommitdiff
path: root/tests/micropython/viper_large_jump.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/viper_large_jump.py')
-rw-r--r--tests/micropython/viper_large_jump.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/micropython/viper_large_jump.py b/tests/micropython/viper_large_jump.py
new file mode 100644
index 000000000..1c5913dec
--- /dev/null
+++ b/tests/micropython/viper_large_jump.py
@@ -0,0 +1,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())