(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / ConditionalCompilationB.vb
blobe1f5150b01dd1211f6bfce25f620fdf69ad0dacc
1 Imports System
2 Module ConditionalCompilation
3 Sub Main()
4 Dim value As Integer
5 Try
6 'Testing #If,#Elseif, #Else and #End If block - Variation 1
8 #If False
9 Throw New Exception("#B11-Conditional Compilation :Failed")
10 #ElseIf True
11 value=10
12 #Else
13 Throw New Exception("#B12-Conditional Compilation :Failed")
14 #End If
16 If value<>10 Then
17 Throw New Exception("#B13-Conditional Compilation:Failed ")
18 End If
19 Catch e As Exception
20 Console.WriteLine(e.Message)
21 End Try
23 Try
24 'Testing #If,#Elseif, #Else and #End If block - Variation 2
26 #If True
27 value=20
28 #ElseIf True
29 Throw New Exception("#B21-Conditional Compilation :Failed")
30 #Else
31 Throw New Exception("#B22-Conditional Compilation :Failed")
32 #End If
34 If value<>20 Then
35 Throw New Exception("#B23-Conditional Compilation:Failed ")
36 End If
37 Catch e As Exception
38 Console.WriteLine(e.Message)
39 End Try
41 Try
42 'Testing #If,#Elseif, #Else and #End If block - Variation 3
44 #If False
45 Throw New Exception("#B31-Conditional Compilation :Failed")
46 #ElseIf False
47 Throw New Exception("#B32-Conditional Compilation :Failed")
48 #Else
49 value=30
50 #End If
52 If value<>30 Then
53 Throw New Exception("#B33-Conditional Compilation:Failed ")
54 End If
55 Catch e As Exception
56 Console.WriteLine(e.Message)
57 End Try
59 Try
60 'Testing #If,#Elseif, #Else and #End If block - Variation 4
62 value=40
63 #If False
64 Throw New Exception("#B41-Conditional Compilation :Failed")
65 #ElseIf False
66 Throw New Exception("#B42-Conditional Compilation :Failed")
67 #ElseIf True
68 value=40
69 #Else
70 Throw New Exception("#B42-Conditional Compilation :Failed")
71 #End If
73 If value<>40 Then
74 Throw New Exception("#B33-Conditional Compilation:Failed ")
75 End If
76 Catch e As Exception
77 Console.WriteLine(e.Message)
78 End Try
81 Try
82 'Testing #If,#Elseif and #End If block - Variation 5
84 value=50
86 #If False
87 Throw New Exception("#B51-Conditional Compilation :Failed")
88 #ElseIf False
89 Throw New Exception("#B52-Conditional Compilation :Failed")
90 #ElseIf False
91 Throw New Exception("#B53-Conditional Compilation :Failed")
92 #End If
94 If value<>50 Then
95 Throw New Exception("#B54-Conditional Compilation:Failed ")
96 End If
97 Catch e As Exception
98 Console.WriteLine(e.Message)
99 End Try
102 'Testing #If,#Elseif and #End If block - Variation 6
104 #If False
105 Throw New Exception("#B61-Conditional Compilation :Failed")
106 #ElseIf True
107 value=60
108 #ElseIf False
109 Throw New Exception("#B63-Conditional Compilation :Failed")
110 #End If
112 If value<>60 Then
113 Throw New Exception("#B64-Conditional Compilation:Failed ")
114 End If
115 Catch e As Exception
116 Console.WriteLine(e.Message)
117 End Try
118 End Sub
119 End Module