projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
oops: forgot to add them
[mono.git]
/
mcs
/
btests
/
LabelB.vb
1
' Positive Test
2
' Test labels in functions
3
Imports System
4
5
Module labelB
6
7
8
Function Abs(ByVal x As Integer) As Integer
9
10
If x >= 0 Then
11
GoTo x
12
End If
13
14
x = -x
15
x: Return x
16
17
End Function
18
19
20
Sub Main()
21
Dim x As Integer, y As Integer
22
x = Abs(-1)
23
y = Abs(1)
24
25
If x <> 1 Then
26
Throw New Exception("#Lbl1")
27
End If
28
If y <> 1 Then
29
Throw New Exception("#Lbl2")
30
End If
31
32
33
End Sub
34
35
36
End Module