summary refs log tree commit diff stats
path: root/tests/collections/ttableconstr.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/collections/ttableconstr.nim')
-rw-r--r--tests/collections/ttableconstr.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/collections/ttableconstr.nim b/tests/collections/ttableconstr.nim
new file mode 100644
index 000000000..1a21a18d1
--- /dev/null
+++ b/tests/collections/ttableconstr.nim
@@ -0,0 +1,16 @@
+# Test if the new table constructor syntax works:
+
+template ignoreExpr(e: expr): stmt {.immediate.} =
+  discard
+
+# test first class '..' syntactical citizen:  
+ignoreExpr x <> 2..4
+# test table constructor:
+ignoreExpr({:})
+ignoreExpr({2: 3, "key": "value"})
+
+# NEW:
+assert 56 in 50..100
+
+assert 56 in ..60
+