2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / btests / EnumA.vb
1 Imports System\r
2 \r
3 Module M\r
4         Enum E\r
5                 A\r
6                 B\r
7                 C\r
8                 D\r
9                 E = 10\r
10                 F\r
11                 G = 5\r
12                 H\r
13                 I = D\r
14                 J = -10\r
15                 K \r
16         End Enum\r
17 \r
18 \r
19         Public Enum E1 As Long\r
20                 A = 10\r
21                 B = 20\r
22         End Enum\r
23 \r
24    Sub Main()
25         dim i as integer
26         i = E.A
27         If i <> 0 Then
28                 Throw new Exception("#A1, unexpected result")
29         End If
30
31         i = E.B
32         If i <> 1 Then
33                 Throw new Exception("#A2, unexpected result")
34         End If
35
36         i = E.C
37         If i <> 2 Then
38                 Throw new Exception("#A3, unexpected result")
39         End If
40         i = E.D
41         If i <> 3 Then
42                 Throw new Exception("#A4, unexpected result")
43         End If
44         i = E.E
45         If i <> 10 Then
46                 Throw new Exception("#A5, unexpected result")
47         End If
48         i = E.F
49         If i <> 11 Then
50                 Throw new Exception("#A6, unexpected result")
51         End If
52         i = E.G
53         If i <> 5 Then
54                 Throw new Exception("#A7, unexpected result")
55         End If
56         i = E.H
57         If i <> 6 Then
58                 Throw new Exception("#A8, unexpected result")
59         End If
60         i = E.I
61         If i <> 3 Then
62                 Throw new Exception("#A9, unexpected result")
63         End If
64         i = E.J
65         If i <> -10 Then
66                 Throw new Exception("#A10, unexpected result")
67         End If
68         i = E.K
69         If i <> -9 Then
70                 Throw new Exception("#A11, unexpected result")
71         End If
72
73 '        Console.WriteLine(E.A)\r
74 '        Console.WriteLine(E.B)\r
75 '        Console.WriteLine(E.C)\r
76 '        Console.WriteLine(E.D)\r
77 '        Console.WriteLine(E.E)\r
78 '        Console.WriteLine(E.F)\r
79 '        Console.WriteLine(E.G)\r
80 '        Console.WriteLine(E.H)\r
81 '        Console.WriteLine(E.I)\r
82 '        Console.WriteLine(E.J)\r
83 '        Console.WriteLine(E.K)\r
84     End Sub\r
85 \r
86         \r
87 \r
88 End Module