**** Merged from MCS ****
[mono-project.git] / mcs / btests / VariablesD.vb
blobd6b295a012bcb4b704d28344cde396f198d0ed69
1 Imports System
2 Class A
3 public shared y as integer = 20
4 public z as integer = 30
6 Shared Sub New()
7 End Sub
9 public Sub New()
10 End Sub
12 Shared function f() as integer
13 return 50
14 end function
15 end class
17 Module M
18 Sub Main()
19 if (A.y <> 20) then
20 Throw new Exception ("#A1, Unexpected result")
21 end if
23 dim c as new A()
24 dim d as new A()
26 if(c.y <> 20) then
27 Throw new Exception ("#A2, Unexpected result")
28 end if
30 if(d.y <> 20) then
31 Throw new Exception ("#A3, Unexpected result")
32 end if
34 A.y = 25
36 if(c.y <> 25) then
37 Throw new Exception ("#A4, Unexpected result")
38 end if
40 c.y = 35
42 if(A.y <> 35) then
43 Throw new Exception ("#A5, Unexpected result")
44 end if
46 if(d.y <> 35) then
47 Throw new Exception ("#A6, Unexpected result")
48 end if
51 if(c.z <> 30) then
52 Throw new Exception ("#A7, Unexpected result")
53 end if
55 if(A.f() <> 50) then
56 Throw new Exception ("#A8, Unexpected result")
57 end if
58 End Sub
59 End Module