summaryrefslogtreecommitdiff
path: root/test/matchconst.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-30 14:00:58 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-30 14:00:58 -0400
commit06910883726c34ebc812b86e813d51442157400e (patch)
treeedc275adec325ade33d74f2ffe7afb6e1be06d99 /test/matchconst.myr
parent56ddddaa8ea95295ebd7743a1c828f0365bf7bb8 (diff)
downloadmc-06910883726c34ebc812b86e813d51442157400e.tar.gz
Add const matching test, fix up test script.
Diffstat (limited to 'test/matchconst.myr')
-rw-r--r--test/matchconst.myr18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/matchconst.myr b/test/matchconst.myr
new file mode 100644
index 0000000..732c04d
--- /dev/null
+++ b/test/matchconst.myr
@@ -0,0 +1,18 @@
+/* some misc constants */
+const Ca = 123
+const Cb = 8
+const Cc = 42
+
+const main = {
+ var v
+
+ v = 8
+ match v
+ Ca: -> 123
+ ;;
+ Cb: -> 88
+ ;;
+ Cc: -> 42
+ ;;
+ ;;
+}