-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathexit_mult.bas
66 lines (52 loc) · 906 Bytes
/
exit_mult.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# include "fbcunit.bi"
SUITE( fbc_tests.compound.exit_mult )
TEST( test_for )
dim as integer cnt = 0
for i as integer = 1 to 2
for j as integer = 1 to 2
cnt += 1
exit for, for
cnt += 1
next
cnt += 1
next
CU_ASSERT_EQUAL( cnt, 1 )
END_TEST
TEST( test_do )
dim as integer cnt = 0
do while cnt = 0
do while cnt = 0
cnt += 1
exit do, do
cnt += 1
loop
cnt += 1
loop
CU_ASSERT_EQUAL( cnt, 1 )
END_TEST
TEST( test_while )
dim as integer cnt = 0
while cnt = 0
while cnt = 0
cnt += 1
exit while, while
cnt += 1
wend
cnt += 1
wend
CU_ASSERT_EQUAL( cnt, 1 )
END_TEST
TEST( test_select )
dim as integer cnt = 0
select case cnt
case 0
select case cnt
case 0
cnt += 1
exit select, select
cnt += 1
end select
end select
CU_ASSERT_EQUAL( cnt, 1 )
END_TEST
END_SUITE