* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / mbas / Test / tests / statements / AssignmentStatementsE.vb
1 'Author:
2 '   V. Sudharsan (vsudharsan@novell.com)
3 '
4 ' (C) 2005 Novell, Inc.
5
6 Module Test
7     Dim a as Integer = 0
8     Function GetIndex()
9                 a = a+1                 
10                 return 1
11     End Function
12
13     Sub Main()    
14         Dim a1(2) As Integer
15         a1(GetIndex()) = a1(GetIndex()) + 1               
16           if a <> 2 then
17                 Throw new System.Exception("Assingment not working properly. Expected 2 but got "&a) 
18           End if
19           a = 0
20         a1(GetIndex()) += 1               
21           if a <> 1 then
22                 Throw new System.Exception("Compound Assingment not working properly. Expected 1 but got "&a) 
23           End if
24     End Sub
25 End Module