(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / mbas / Test / tests / LoopStatementsA.vb
blob24d0bf4635e3b43be25e26c8eac3789b3c3ff781
1 Imports System
3 Module LoopStatementsA
5 Sub main()
6 Dim index As Integer = 0
7 Dim count As Integer = 0
9 Do
10 count += 1
11 index = 0
12 While index <> 4
13 index += 1
14 End While
15 If index <> 4 Then
16 Throw New Exception("#LSA1 - Loop Statement failed")
17 End If
19 Do While index < 10
20 index += 1
21 If index = 8 Then
22 Exit Do
23 End If
24 Loop
25 If index <> 8 Then
26 Throw New Exception("#LSA2 - Loop Statement failed")
27 End If
30 index += 1
31 Loop While index < 12
32 If index <> 12 Then
33 Throw New Exception("#LSA3 - Loop Statement failed")
34 End If
36 Do Until index <= 8
37 index -= 1
38 Loop
39 If index <> 8 Then
40 Throw New Exception("#LSA4 - Loop Statenment failed")
41 End If
44 index -= 1
45 If index = 4 Then
46 Exit Do
47 End If
48 Loop Until index <= 3
49 If index <> 4 Then
50 Throw New Exception("#LSA5 - Loop Statenment failed")
51 End If
53 If count = 2 Then
54 Exit Do
55 Exit Do
56 End If
58 Loop
60 End Sub
62 End Module