summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-04-07 23:54:24 +1000
committerDamien George <damien@micropython.org>2022-04-14 23:52:14 +1000
commitabdc4ec08d742642598555ba8e1854fe1445645e (patch)
treeeb9c6df89a8cf9e283116fba7bd1f2ba870cc8fb
parent999abbb8b5a0ed9ee17e9295cc758e44a5511b80 (diff)
qemu-arm/test-frzmpy: Add test for freezing constant tuples.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/qemu-arm/test-frzmpy/frozen_const.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ports/qemu-arm/test-frzmpy/frozen_const.py b/ports/qemu-arm/test-frzmpy/frozen_const.py
new file mode 100644
index 000000000..19af4a3e2
--- /dev/null
+++ b/ports/qemu-arm/test-frzmpy/frozen_const.py
@@ -0,0 +1,11 @@
+# Test freezing constants.
+
+x0 = (1,)
+x1 = (1, 2)
+x2 = (1, 1 << 100)
+x3 = (None, False, True, ...)
+x4 = ("str", b"bytes")
+x5 = ((),)
+x6 = ((1,),)
+x7 = ((1, 2),)
+x8 = (1, "str", (), ("nested", 2, ((False, True), None, ...)))