2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
authorBernie Solomon <bernard@mono-cvs.ximian.com>
Wed, 11 Aug 2004 23:46:32 +0000 (23:46 -0000)
committerBernie Solomon <bernard@mono-cvs.ximian.com>
Wed, 11 Aug 2004 23:46:32 +0000 (23:46 -0000)
* TypeOf.vb:
* Test.Sources: New test

svn path=/trunk/mcs/; revision=32250

mcs/btests/ChangeLog
mcs/btests/Test.Sources
mcs/btests/TypeOf.vb [new file with mode: 0644]

index 5b7c83e044893ad01b4b87ae05bef008d2e4f7be..601704040daf049aa43d232e7619c5c4e3558e85 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
+       * TypeOf.vb:
+       * Test.Sources: New test
+
 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
        * EnumB.vb:
        * Test.Sources: New test
index de8861cfc2abc25a53512dcd3560dc217ea861c7..40c5975f4714f8485c32b0b61ea4274b69557c2f 100644 (file)
@@ -168,6 +168,7 @@ ArithmeticOperatorsA \
 LikeOperator \
 LikeOperatorA \
 GetType \
+TypeOf \
 BlockStatementsA \
 LocalVariablesA \
 LocalVariablesB
diff --git a/mcs/btests/TypeOf.vb b/mcs/btests/TypeOf.vb
new file mode 100644 (file)
index 0000000..cdb7a15
--- /dev/null
@@ -0,0 +1,21 @@
+Imports System
+
+Module M
+       Class Test1
+       End Class
+
+        Class Test2
+       End Class
+
+       Sub Main
+               Dim o As Object
+               o = new Test1()
+               If Not TypeOf o Is Test1 Then
+                       Throw New Exception("#A1: TypeOf failed")
+               End If
+               If TypeOf o Is Test2 Then
+                       Throw New Exception("#A2: TypeOf failed")
+               End If
+       End Sub
+End Module
+