**** Merged from MCS ****
[mono-project.git] / mcs / btests / LabelC.vb
blob91c69816a072c3a693c2edde93e87479da437ea3
1 ' Positive Test
2 ' Test labels in functions
3 Imports System
5 Module labelC
8 Function Abs(ByVal x As Integer) As Integer
10 If x >= 0 Then
11 GoTo x
12 End If
14 x = -x
19 Return x
21 End Function
24 Sub Main()
25 Dim x As Integer, y As Integer
26 x = Abs(-1)
27 y = Abs(1)
29 If x <> 1 Then
30 Throw New Exception("#Lbl1")
31 End If
32 If y <> 1 Then
33 Throw New Exception("#Lbl2")
34 End If
37 End Sub
40 End Module