Updating built in Io code to use += instead of x = x + y
[io/quag.git] / libs / iovm / tests / LoopTest.io
blobf056982f697c729596eba69831baddc47909514c
2 LoopTest := UnitTest clone do(
4 testLoop1 := method(
5 loop(
6 break
7 fail
11 testLoop2 := method(
12 i := 0
13 loop(
14 i = i + 1
15 if( i < 10, continue, break)
16 fail
18 assertTrue( i == 10 )
21 testLoop3 := method(
22 i := 0
23 loop(
24 i = i + 1
25 if( i >= 10, break, continue)
26 fail
28 assertTrue( i == 10 )