Add 'when' test
This commit is contained in:
parent
73e559fbe4
commit
1c90901553
16
test/when.tm
Normal file
16
test/when.tm
Normal file
@ -0,0 +1,16 @@
|
||||
# Tests for the 'when' block
|
||||
|
||||
func main():
|
||||
str := "B"
|
||||
when str is "A":
|
||||
fail("First")
|
||||
is "B":
|
||||
say("Success")
|
||||
is "C":
|
||||
fail("Third")
|
||||
|
||||
n := 23
|
||||
>> when n is 1: Int64(1)
|
||||
is 2: Int64(2)
|
||||
is 21 + 2: Int64(23)
|
||||
= 23 : Int64?
|
Loading…
Reference in New Issue
Block a user