summary refs log tree commit diff stats
path: root/tests/casestmt/tcasestm.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/casestmt/tcasestm.nim')
-rw-r--r--tests/casestmt/tcasestm.nim40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/casestmt/tcasestm.nim b/tests/casestmt/tcasestm.nim
deleted file mode 100644
index 7ac20bf2f..000000000
--- a/tests/casestmt/tcasestm.nim
+++ /dev/null
@@ -1,40 +0,0 @@
-discard """
-  file: "tcasestm.nim"
-  output: "ayyydd"
-"""
-# Test the case statement
-
-type
-  Tenum = enum eA, eB, eC
-
-var
-  x: string = "yyy"
-  y: Tenum = eA
-  i: int
-
-case y
-of eA: write(stdout, "a")
-of eB, eC: write(stdout, "b or c")
-
-case x
-of "Andreas", "Rumpf": write(stdout, "Hallo Meister!")
-of "aa", "bb": write(stdout, "Du bist nicht mein Meister")
-of "cc", "hash", "when": discard
-of "will", "it", "finally", "be", "generated": discard
-
-var z = case i
-  of 1..5, 8, 9: "aa"
-  of 6, 7: "bb"
-  elif x == "Ha":
-    "cc"
-  elif x == "yyy":
-    write(stdout, x)
-    "dd"
-  else:
-    "zz"
-
-echo z
-#OUT ayyy
-
-
-