start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
32
tests/accept/run/tcasestm.nim
Normal file
32
tests/accept/run/tcasestm.nim
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# 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": nil
|
||||
of "will", "it", "finally", "be", "generated": nil
|
||||
|
||||
case i
|
||||
of 1..5, 8, 9: nil
|
||||
of 6, 7: nil
|
||||
elif x == "Ha":
|
||||
nil
|
||||
elif x == "yyy":
|
||||
write(stdout, x)
|
||||
else:
|
||||
nil
|
||||
|
||||
#OUT ayyy
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue