(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / InvocationStatementA.vb
blob8b0115cdacac795a290880c828e56bd89ce4e7f0
1 Imports Microsoft.VisualBasic
2 Imports System
4 Module InvocationStatementA
5 Dim i As Integer = 0
7 Delegate Function Df(ByVal a As Integer)
9 Sub f1()
10 i += 1
11 f2()
12 End Sub
14 Function f2() As Integer
15 i += 2
16 End Function
18 Function f2(ByVal i As Integer) As Integer
19 i += 5
20 Return i
21 End Function
23 Function f2(ByVal o As Object) As Boolean
24 Return True
25 End Function
27 Function f3(ByVal j As Integer)
28 i += j
29 End Function
31 Function f4(ByVal j As Integer)
32 i += j * 10
33 End Function
35 Sub main()
37 Call f1()
38 If i <> 3 Then
39 Throw New Exception("#ISB1 - Invocation Statement failed")
40 End If
42 If f2(i) <> 8 Then
43 Throw New Exception("#ISB2 - Invocation Statement failed")
44 End If
46 If Not f2("Hello") Then
47 Throw New Exception("#ISB3 - Invocation Statement failed")
48 End If
50 If Not f2(2.3D) Then
51 Throw New Exception("#ISB4 - Invocation Statement failed")
52 End If
54 Dim d1, d2 As Df
55 d1 = New Df(AddressOf f3)
56 d2 = New Df(AddressOf f4)
58 d1.Invoke(2) : d2.Invoke(2)
59 If i <> 25 Then
60 Throw New Exception("#ISB5 - Invocation Statement failed")
61 End If
63 End Sub
65 End Module