repo.or.cz
/
io
/
quag.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updating built in Io code to use += instead of x = x + y
[io/quag.git]
/
libs
/
iovm
/
tests
/
LoopTest.io
blob
f056982f697c729596eba69831baddc47909514c
1
2
LoopTest
:=
UnitTest
clone do
(
3
4
testLoop1
:=
method
(
5
loop
(
6
break
7
fail
8
)
9
)
10
11
testLoop2
:=
method
(
12
i
:=
0
13
loop
(
14
i
=
i
+
1
15
if
(
i
<
10
,
continue
,
break
)
16
fail
17
)
18
assertTrue
(
i
==
10
)
19
)
20
21
testLoop3
:=
method
(
22
i
:=
0
23
loop
(
24
i
=
i
+
1
25
if
(
i
>=
10
,
break
,
continue
)
26
fail
27
)
28
assertTrue
(
i
==
10
)
29
)
30
)