Test cases for Type members and Like operator
authorManjula GHM <manjula@mono-cvs.ximian.com>
Fri, 18 Mar 2005 04:45:46 +0000 (04:45 -0000)
committerManjula GHM <manjula@mono-cvs.ximian.com>
Fri, 18 Mar 2005 04:45:46 +0000 (04:45 -0000)
svn path=/trunk/mcs/; revision=41973

73 files changed:
mcs/mbas/Test/ChangeLog
mcs/mbas/Test/rerrors/LikeOperator2.vb [new file with mode: 0755]
mcs/mbas/Test/rerrors/LikeOperator3.vb [new file with mode: 0755]
mcs/mbas/Test/rerrors/Test/Variables1.vb [new file with mode: 0755]
mcs/mbas/Test/rerrors/Test/Variables2.vb [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsB.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsC.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/AssignmentStatementsD.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsE.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsF.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsG.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsH.exe [new file with mode: 0755]
mcs/mbas/Test/tests/AssignmentStatementsI.exe [new file with mode: 0755]
mcs/mbas/Test/tests/BlockStatementsA.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/ConditionalStatementsA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsB.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsC.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/ConditionalStatementsD.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/ConditionalStatementsE.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsF.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsG.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsH.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsI.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConditionalStatementsJ.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ConstantC.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorD.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorE.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorF.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorG.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorH.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorI.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ConstructorJ.vb [new file with mode: 0755]
mcs/mbas/Test/tests/EventM.vb [new file with mode: 0755]
mcs/mbas/Test/tests/EventN.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ExitStatementA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/ExitStatementA.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/GotoStatementA.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/InterfaceQ.vb [new file with mode: 0755]
mcs/mbas/Test/tests/InvocationStatementA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LikeOperatorB.vb [new file with mode: 0755]
mcs/mbas/Test/tests/LikeOperatorC.vb [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsB.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsC.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsD.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsE.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/LoopStatementsF.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsG.exe [new file with mode: 0755]
mcs/mbas/Test/tests/LoopStatementsG.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/MethodDeclarationA.vb [new file with mode: 0755]
mcs/mbas/Test/tests/MethodDeclarationB.vb [new file with mode: 0755]
mcs/mbas/Test/tests/MethodDeclarationC.vb [new file with mode: 0755]
mcs/mbas/Test/tests/MethodDeclarationD.vb [new file with mode: 0755]
mcs/mbas/Test/tests/MethodDeclarationE.vb [new file with mode: 0755]
mcs/mbas/Test/tests/MethodDeclarationF.vb [new file with mode: 0755]
mcs/mbas/Test/tests/PropertyE.vb [new file with mode: 0755]
mcs/mbas/Test/tests/ReturnStatementA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/StopStatementA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/StopStatementA.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/TestResults.log [new file with mode: 0644]
mcs/mbas/Test/tests/VariablesH.vb [new file with mode: 0755]
mcs/mbas/Test/tests/VariablesI.vb [new file with mode: 0755]
mcs/mbas/Test/tests/VariablesJ.vb [new file with mode: 0755]
mcs/mbas/Test/tests/VariablesK.vb [new file with mode: 0755]
mcs/mbas/Test/tests/VariablesL.vb [new file with mode: 0755]
mcs/mbas/Test/tests/VariablesM.vb [new file with mode: 0755]
mcs/mbas/Test/tests/WithStatementA.exe [new file with mode: 0755]
mcs/mbas/Test/tests/WithStatementB.exe [new file with mode: 0755]
mcs/mbas/Test/tests/WithStatementB.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/WithStatementC.vb.log [new file with mode: 0644]
mcs/mbas/Test/tests/test.vb [new file with mode: 0644]
mcs/mbas/Test/tests/test1.vb [new file with mode: 0644]

index 28dc85c5bfa5ffaaccc6454dd6aec83674251931..aab075b76cb3fbf6020bfbab4a53168551e34cf8 100644 (file)
@@ -1,3 +1,6 @@
+2005-03-18 Manjula GHM <mmanjula@novell.com>
+           Sudharsan V <vsudharsan@novell.com>
+          * Test cases for Type members and Like operator
 2005-02-09  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile (SUBDIRS): Add 'rerrors'.
diff --git a/mcs/mbas/Test/rerrors/LikeOperator2.vb b/mcs/mbas/Test/rerrors/LikeOperator2.vb
new file mode 100755 (executable)
index 0000000..4b10e4a
--- /dev/null
@@ -0,0 +1,20 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Option Compare text\r
+Imports System\r
+Imports Nunit.Framework\r
+\r
+<TestFixture> _\r
+Public Class LikeOperator2\r
+                 <Test, ExpectedException (GetType (System.ArgumentException))> _\r
+       Public Sub TestForException ()\r
+               dim a as boolean\r
+               a = "?" Like "[?"\r
+               If a <> True Then\r
+                   Throw new System.Exception("#A1-LikeOperator:Failed")\r
+               End If\r
+       end sub\r
+End class
diff --git a/mcs/mbas/Test/rerrors/LikeOperator3.vb b/mcs/mbas/Test/rerrors/LikeOperator3.vb
new file mode 100755 (executable)
index 0000000..21235c4
--- /dev/null
@@ -0,0 +1,20 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'Option Compare text\r
+Imports System\r
+Imports Nunit.Framework\r
+\r
+<TestFixture> _\r
+Public Class LikeOperator2\r
+                 <Test, ExpectedException (GetType (System.Exception))> _\r
+       Public Sub TestForException ()\r
+               dim a as boolean\r
+               a = "f" Like "[Z-A]"\r
+               If a <> True Then\r
+                   Throw new System.Exception("#A1-LikeOperator:Failed")\r
+               End If\r
+       end sub\r
+End class
diff --git a/mcs/mbas/Test/rerrors/Test/Variables1.vb b/mcs/mbas/Test/rerrors/Test/Variables1.vb
new file mode 100755 (executable)
index 0000000..abac324
--- /dev/null
@@ -0,0 +1,17 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+Imports Nunit.Framework\r
+\r
+<TestFixture>_\r
+Public Class VariablesI\r
+       _<Test, ExpectedException (GetType (System.TypeInitializationException))>\r
+         Readonly Shared Public i as integer = "Hello"\r
+        Public Sub TestForException()\r
+               if i <> 1\r
+               End if          \r
+        End Sub\r
+End Class 
diff --git a/mcs/mbas/Test/rerrors/Test/Variables2.vb b/mcs/mbas/Test/rerrors/Test/Variables2.vb
new file mode 100755 (executable)
index 0000000..82fb68c
--- /dev/null
@@ -0,0 +1,16 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+Imports Nunit.Framework\r
+\r
+<TestFixture>_\r
+Public Class Variables2\r
+       _<Test, ExpectedException (GetType (System.InvalidCastException))>\r
+        Public Sub TestForException()\r
+               dim a as string = "hello"\r
+               dim i(1,a) as A \r
+        End Sub\r
+End Class 
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsA.exe b/mcs/mbas/Test/tests/AssignmentStatementsA.exe
new file mode 100755 (executable)
index 0000000..c95893f
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsA.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsB.exe b/mcs/mbas/Test/tests/AssignmentStatementsB.exe
new file mode 100755 (executable)
index 0000000..266b463
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsB.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsC.vb.log b/mcs/mbas/Test/tests/AssignmentStatementsC.vb.log
new file mode 100644 (file)
index 0000000..38f9558
--- /dev/null
@@ -0,0 +1,12 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   AssignmentStatementsC.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+AssignmentStatementsC.vb(18,15) error BC30455: Could not find any applicable function to invoke for this argument list
+AssignmentStatementsC.vb(28,15) error BC30455: Could not find any applicable function to invoke for this argument list
+AssignmentStatementsC.vb(33,15) error BC30455: Could not find any applicable function to invoke for this argument list
+AssignmentStatementsC.vb(38,17) error BC30455: Could not find any applicable function to invoke for this argument list
+Compilation failed: 4 Error(s), 1 warnings
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsD.exe b/mcs/mbas/Test/tests/AssignmentStatementsD.exe
new file mode 100755 (executable)
index 0000000..295c675
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsD.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsE.exe b/mcs/mbas/Test/tests/AssignmentStatementsE.exe
new file mode 100755 (executable)
index 0000000..67cf8ed
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsE.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsF.exe b/mcs/mbas/Test/tests/AssignmentStatementsF.exe
new file mode 100755 (executable)
index 0000000..52fe96d
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsF.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsG.exe b/mcs/mbas/Test/tests/AssignmentStatementsG.exe
new file mode 100755 (executable)
index 0000000..60e9121
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsG.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsH.exe b/mcs/mbas/Test/tests/AssignmentStatementsH.exe
new file mode 100755 (executable)
index 0000000..1d7b5c1
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsH.exe differ
diff --git a/mcs/mbas/Test/tests/AssignmentStatementsI.exe b/mcs/mbas/Test/tests/AssignmentStatementsI.exe
new file mode 100755 (executable)
index 0000000..40e2b37
Binary files /dev/null and b/mcs/mbas/Test/tests/AssignmentStatementsI.exe differ
diff --git a/mcs/mbas/Test/tests/BlockStatementsA.vb.log b/mcs/mbas/Test/tests/BlockStatementsA.vb.log
new file mode 100644 (file)
index 0000000..745c5fa
--- /dev/null
@@ -0,0 +1,8 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   BlockStatementsA.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+BlockStatementsA.vb(34,0) error BC0140: The label 'f1' is a duplicate
+Compilation failed: 1 Error(s), 0 warnings
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsA.exe b/mcs/mbas/Test/tests/ConditionalStatementsA.exe
new file mode 100755 (executable)
index 0000000..89cf7f0
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsA.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsB.exe b/mcs/mbas/Test/tests/ConditionalStatementsB.exe
new file mode 100755 (executable)
index 0000000..a7bef37
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsB.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsC.vb.log b/mcs/mbas/Test/tests/ConditionalStatementsC.vb.log
new file mode 100644 (file)
index 0000000..25cca95
--- /dev/null
@@ -0,0 +1,9 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   ConditionalStatementsC.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+syntax error, got token `OP_GE'
+ConditionalStatementsC.vb(26,28) error BC29999: Parsing error
+Compilation failed: 1 Error(s), 0 warnings
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsD.vb.log b/mcs/mbas/Test/tests/ConditionalStatementsD.vb.log
new file mode 100644 (file)
index 0000000..9db6aa1
--- /dev/null
@@ -0,0 +1,8 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   ConditionalStatementsD.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+ConditionalStatementsD.vb(16,0) error BC29999: Parsing error
+Compilation failed: 1 Error(s), 0 warnings
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsE.exe b/mcs/mbas/Test/tests/ConditionalStatementsE.exe
new file mode 100755 (executable)
index 0000000..f69be84
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsE.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsF.exe b/mcs/mbas/Test/tests/ConditionalStatementsF.exe
new file mode 100755 (executable)
index 0000000..cf435d5
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsF.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsG.exe b/mcs/mbas/Test/tests/ConditionalStatementsG.exe
new file mode 100755 (executable)
index 0000000..976bf00
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsG.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsH.exe b/mcs/mbas/Test/tests/ConditionalStatementsH.exe
new file mode 100755 (executable)
index 0000000..7b9a1dc
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsH.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsI.exe b/mcs/mbas/Test/tests/ConditionalStatementsI.exe
new file mode 100755 (executable)
index 0000000..719a175
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsI.exe differ
diff --git a/mcs/mbas/Test/tests/ConditionalStatementsJ.exe b/mcs/mbas/Test/tests/ConditionalStatementsJ.exe
new file mode 100755 (executable)
index 0000000..824f92f
Binary files /dev/null and b/mcs/mbas/Test/tests/ConditionalStatementsJ.exe differ
diff --git a/mcs/mbas/Test/tests/ConstantC.vb b/mcs/mbas/Test/tests/ConstantC.vb
new file mode 100755 (executable)
index 0000000..60fb156
--- /dev/null
@@ -0,0 +1,19 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'Checking on all possible acessors on const\r
+Imports System\r
+\r
+Module Test\r
+       Const a as Integer = 1\r
+       Public Const a1 as Integer = 1\r
+       Private Const a2 as Integer = 1\r
+       Class C\r
+               Protected Const a3 as Integer = 1\r
+       End Class\r
+       Public Sub Main()                                               \r
+       End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorD.vb b/mcs/mbas/Test/tests/ConstructorD.vb
new file mode 100755 (executable)
index 0000000..0eb4da0
--- /dev/null
@@ -0,0 +1,26 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To Prove Constructors can be overloaded\r
+\r
+Imports System\r
+\r
+Class A\r
+       Sub New()               \r
+       End Sub\r
+       Sub New(I as Integer)           \r
+       End Sub\r
+       Sub New(I as Integer, J as Integer)             \r
+       End Sub\r
+       Shared Sub New()\r
+       End Sub\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+      Dim a as A = New A(10)\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorE.vb b/mcs/mbas/Test/tests/ConstructorE.vb
new file mode 100755 (executable)
index 0000000..8c2e8ab
--- /dev/null
@@ -0,0 +1,23 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Structure A\r
+       Dim i as Integer\r
+       Sub New(I as Integer)\r
+       End Sub\r
+       Sub New(I as Integer, J as Integer)             \r
+       End Sub\r
+       Shared Sub New()\r
+       End Sub\r
+End Structure\r
+\r
+Module Test\r
+    Public Sub Main()\r
+      Dim a as A = New A(10)   \r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorF.vb b/mcs/mbas/Test/tests/ConstructorF.vb
new file mode 100755 (executable)
index 0000000..88639f6
--- /dev/null
@@ -0,0 +1,29 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Class A\r
+       Public i as Integer = 10\r
+       Sub New()\r
+       End Sub \r
+End Class\r
+\r
+Class AB\r
+       Inherits A\r
+       Public i1 as Integer = MyBase.i\r
+       Sub New()\r
+               if i1<>10 then\r
+                       Throw new System.Exception("Constructor not working properly")\r
+               End if\r
+       End Sub \r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+      Dim a as AB= New AB()    \r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorG.vb b/mcs/mbas/Test/tests/ConstructorG.vb
new file mode 100755 (executable)
index 0000000..70946f0
--- /dev/null
@@ -0,0 +1,32 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To check if initializing takes place according to the occurance\r
+\r
+Imports System\r
+\r
+Class A\r
+       Public i as Integer = j\r
+       Public j as Integer = 1\r
+       Sub New()               \r
+               if i<>0\r
+                       Throw new System.Exception("Constructor not working properly")                  \r
+               End if\r
+       End Sub\r
+End Class\r
+\r
+Class AB\r
+       Inherits A\r
+       Public k as Integer = i\r
+       Sub New()               \r
+       End Sub\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+      Dim a as AB = New AB()\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorH.vb b/mcs/mbas/Test/tests/ConstructorH.vb
new file mode 100755 (executable)
index 0000000..6388233
--- /dev/null
@@ -0,0 +1,23 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Class A        \r
+       ' Has implicit Constructor defined\r
+End Class\r
+\r
+Class AB\r
+       Inherits A\r
+       Sub New()                       \r
+       End Sub\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+               Dim a as AB = new AB()\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorI.vb b/mcs/mbas/Test/tests/ConstructorI.vb
new file mode 100755 (executable)
index 0000000..deacb9d
--- /dev/null
@@ -0,0 +1,32 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Imports A\r
+\r
+NameSpace A\r
+       Public Class B\r
+               Shared Public i as integer\r
+       End Class\r
+End Namespace\r
+\r
+Class AB\r
+       Shared Sub New()                                \r
+               A.B.i = A.B.i + 1\r
+       End Sub\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+               Dim a1 as AB = new AB()\r
+               Dim b2 as AB = new AB()\r
+               Dim c3 as AB = new AB()\r
+               if A.B.i<>1\r
+                       Throw new System.Exception("Shared Constructor not working")\r
+               End if\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ConstructorJ.vb b/mcs/mbas/Test/tests/ConstructorJ.vb
new file mode 100755 (executable)
index 0000000..2ebb42c
--- /dev/null
@@ -0,0 +1,29 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'Checking circular references\r
+\r
+Imports System\r
+\r
+Class A\r
+    Public Shared X As Integer = B.Y + 1\r
+    Shared Sub Hello()\r
+               if A.X <> 2 or B.Y <> 1\r
+                       Throw new System.Exception("Shared Construtor not working")\r
+               End if\r
+    End Sub\r
+End Class\r
+\r
+Class B\r
+    Public Shared Y As Integer = A.X + 1\r
+End Class\r
+\r
+\r
+Module Test\r
+    Public Sub Main()          \r
+               A.Hello()\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/EventM.vb b/mcs/mbas/Test/tests/EventM.vb
new file mode 100755 (executable)
index 0000000..c649da5
--- /dev/null
@@ -0,0 +1,26 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To Check if Methods Accebility has anything to do with Events\r
+\r
+Imports System\r
+\r
+Class Raiser\r
+    Public Event Fun(ByVal i as Integer)\r
+    Public Sub New(i as Integer)\r
+        RaiseEvent Fun(23)\r
+    End Sub\r
+End Class\r
+\r
+Module Test\r
+    Private WithEvents x As Raiser\r
+\r
+    Private Sub Fun(ByVal i as integer) Handles x.Fun\r
+    End Sub\r
+\r
+    Public Sub Main()\r
+        x = New Raiser(10)\r
+    End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/EventN.vb b/mcs/mbas/Test/tests/EventN.vb
new file mode 100755 (executable)
index 0000000..fe12ea6
--- /dev/null
@@ -0,0 +1,31 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To Check if Multiple Methods can access mulitplte events\r
+\r
+Imports System\r
+\r
+Class Raiser\r
+    Public Event Fun(ByVal i as Integer)\r
+    Public Event Fun1(ByVal i as Integer)\r
+    Public Sub New(i as Integer)\r
+        RaiseEvent Fun(23)\r
+    End Sub\r
+End Class\r
+\r
+Module Test\r
+    Private WithEvents x As Raiser\r
+\r
+    Private Sub Fun(ByVal i as integer) Handles x.Fun, X.Fun1\r
+    End Sub\r
+    \r
+    Public Sub Fun1(ByVal i as integer) Handles X.Fun1\r
+    End Sub\r
+\r
+\r
+    Public Sub Main()\r
+        x = New Raiser(10)\r
+    End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/ExitStatementA.exe b/mcs/mbas/Test/tests/ExitStatementA.exe
new file mode 100755 (executable)
index 0000000..0bf4849
Binary files /dev/null and b/mcs/mbas/Test/tests/ExitStatementA.exe differ
diff --git a/mcs/mbas/Test/tests/ExitStatementA.vb.log b/mcs/mbas/Test/tests/ExitStatementA.vb.log
new file mode 100644 (file)
index 0000000..2d628e4
--- /dev/null
@@ -0,0 +1,16 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   ExitStatementA.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+ExitStatementA.vb(11,0) warning BC0162: Unreachable code detected
+Compilation succeeded: 2 warning(s)
+
+MONO_PATH="../../../class/lib/default::$MONO_PATH" mono  --debug ./ExitStatementA.exe
+
+** ERROR **: Invalid IL code at IL0000 in exitstmt:fun (): IL_0000: ret       
+
+
+aborting...
diff --git a/mcs/mbas/Test/tests/GotoStatementA.vb.log b/mcs/mbas/Test/tests/GotoStatementA.vb.log
new file mode 100644 (file)
index 0000000..500ed2e
--- /dev/null
@@ -0,0 +1,8 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   GotoStatementA.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+GotoStatementA.vb(10,0) error BC29999: 'Nothing' found without a matching 'Block'
+Compilation failed
diff --git a/mcs/mbas/Test/tests/InterfaceQ.vb b/mcs/mbas/Test/tests/InterfaceQ.vb
new file mode 100755 (executable)
index 0000000..cf231dd
--- /dev/null
@@ -0,0 +1,29 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Module InterfaceA\r
+       Interface A\r
+               Sub fun()               \r
+               Sub fun1()\r
+               Sub fun2()\r
+               Sub fun3()\r
+       End Interface\r
+       \r
+       Class B         \r
+               Implements A\r
+               Public Sub AA1() Implements A.fun\r
+               End Sub\r
+               Private Sub AA2() Implements A.fun1\r
+               End Sub\r
+               Protected Sub AA3() Implements A.fun2\r
+               End Sub\r
+               Sub AA4() Implements A.fun3\r
+               End Sub\r
+       End Class\r
+       \r
+       Sub Main()              \r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/InvocationStatementA.exe b/mcs/mbas/Test/tests/InvocationStatementA.exe
new file mode 100755 (executable)
index 0000000..72192bf
Binary files /dev/null and b/mcs/mbas/Test/tests/InvocationStatementA.exe differ
diff --git a/mcs/mbas/Test/tests/LikeOperatorB.vb b/mcs/mbas/Test/tests/LikeOperatorB.vb
new file mode 100755 (executable)
index 0000000..40250d1
--- /dev/null
@@ -0,0 +1,17 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'Option Compare text\r
+Imports System\r
+\r
+Module LikeOperator2\r
+        Public Sub Main()\r
+               dim a as boolean\r
+               a = "o" Like "[A-Z]"\r
+               If a <> False Then\r
+                   Throw new System.Exception("#A1-LikeOperator:Failed")\r
+               End If\r
+       end sub\r
+End Module
diff --git a/mcs/mbas/Test/tests/LikeOperatorC.vb b/mcs/mbas/Test/tests/LikeOperatorC.vb
new file mode 100755 (executable)
index 0000000..29d91a4
--- /dev/null
@@ -0,0 +1,17 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'Option Compare text\r
+Imports System\r
+\r
+Module LikeOperator2\r
+        Public Sub Main()\r
+               dim a as boolean\r
+               a = "" Like "[]"\r
+               If a <> True Then\r
+                   Throw new System.Exception("#A1-LikeOperator:Failed")\r
+               End If\r
+       end sub\r
+End Module
diff --git a/mcs/mbas/Test/tests/LoopStatementsA.exe b/mcs/mbas/Test/tests/LoopStatementsA.exe
new file mode 100755 (executable)
index 0000000..57f2b85
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsA.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsB.exe b/mcs/mbas/Test/tests/LoopStatementsB.exe
new file mode 100755 (executable)
index 0000000..93e24c8
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsB.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsC.exe b/mcs/mbas/Test/tests/LoopStatementsC.exe
new file mode 100755 (executable)
index 0000000..94a320a
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsC.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsD.exe b/mcs/mbas/Test/tests/LoopStatementsD.exe
new file mode 100755 (executable)
index 0000000..ba1095c
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsD.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsE.vb.log b/mcs/mbas/Test/tests/LoopStatementsE.vb.log
new file mode 100644 (file)
index 0000000..9040283
--- /dev/null
@@ -0,0 +1,30 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   LoopStatementsE.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+Exception: System.Exception: Expression Mono.MonoBASIC.Binary did not set its type after Resolve
+called from: Mono.MonoBASIC.Binary
+in <0x00548> Mono.MonoBASIC.Expression:Resolve (Mono.MonoBASIC.EmitContext ec, ResolveFlags flags)
+in <0x00012> Mono.MonoBASIC.Expression:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x00131> Mono.MonoBASIC.Assign:DoResolve (Mono.MonoBASIC.EmitContext ec)
+in <0x0016d> Mono.MonoBASIC.Expression:Resolve (Mono.MonoBASIC.EmitContext ec, ResolveFlags flags)
+in <0x00012> Mono.MonoBASIC.Expression:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x0001d> Mono.MonoBASIC.StatementExpression:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x000eb> Mono.MonoBASIC.For:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x00167> Mono.MonoBASIC.Block:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x00167> Mono.MonoBASIC.Block:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x00167> Mono.MonoBASIC.Block:Resolve (Mono.MonoBASIC.EmitContext ec)
+in <0x000cc> Mono.MonoBASIC.EmitContext:EmitTopBlock (Mono.MonoBASIC.Block block, System.String bname, Mono.MonoBASIC.InternalParameters ip, Location loc)
+in <0x0044d> Mono.MonoBASIC.MethodData:Emit (Mono.MonoBASIC.TypeContainer parent, Mono.MonoBASIC.Block block, System.Object kind)
+in <0x00031> Mono.MonoBASIC.Method:Emit (Mono.MonoBASIC.TypeContainer parent)
+in <0x00253> Mono.MonoBASIC.TypeContainer:Emit ()
+in <0x0030d> Mono.MonoBASIC.RootContext:EmitCode ()
+in <0x0003f> Mono.Languages.Driver:GenerateAssembly ()
+in <0x0004b> Mono.Languages.Driver:CompileAll ()
+Compilation succeeded: 1 warning(s)
+
+MONO_PATH="../../../class/lib/default::$MONO_PATH" mono  --debug ./LoopStatementsE.exe
+cannot open assembly ./LoopStatementsE.exe
diff --git a/mcs/mbas/Test/tests/LoopStatementsF.exe b/mcs/mbas/Test/tests/LoopStatementsF.exe
new file mode 100755 (executable)
index 0000000..f946ece
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsF.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsG.exe b/mcs/mbas/Test/tests/LoopStatementsG.exe
new file mode 100755 (executable)
index 0000000..bd004d8
Binary files /dev/null and b/mcs/mbas/Test/tests/LoopStatementsG.exe differ
diff --git a/mcs/mbas/Test/tests/LoopStatementsG.vb.log b/mcs/mbas/Test/tests/LoopStatementsG.vb.log
new file mode 100644 (file)
index 0000000..9d6e4a0
--- /dev/null
@@ -0,0 +1,13 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   LoopStatementsG.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+Compilation succeeded: 1 warning(s)
+
+MONO_PATH="../../../class/lib/default::$MONO_PATH" mono  --debug ./LoopStatementsG.exe
+
+Unhandled Exception: System.Exception: For loop not working. Expected -1 but got 9
+in <0x000d5> Test:Main ()
diff --git a/mcs/mbas/Test/tests/MethodDeclarationA.vb b/mcs/mbas/Test/tests/MethodDeclarationA.vb
new file mode 100755 (executable)
index 0000000..3630111
--- /dev/null
@@ -0,0 +1,16 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To check if a variable without any type is been accepted or not\r
+\r
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Sub A(i)                        \r
+       End Sub\r
+       Sub Main()\r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/MethodDeclarationB.vb b/mcs/mbas/Test/tests/MethodDeclarationB.vb
new file mode 100755 (executable)
index 0000000..4770dda
--- /dev/null
@@ -0,0 +1,19 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Function A(ByRef i as Integer)As Integer                         \r
+               i = 10\r
+       End Function\r
+       Function AB()As Integer                  \r
+               return 10\r
+       End Function\r
+       Sub Main()\r
+               A(AB())\r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/MethodDeclarationC.vb b/mcs/mbas/Test/tests/MethodDeclarationC.vb
new file mode 100755 (executable)
index 0000000..33190ff
--- /dev/null
@@ -0,0 +1,20 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Function A(ByRef i as Integer)As Integer                         \r
+               i = 19\r
+       End Function\r
+       Sub Main()\r
+               Dim i as String\r
+               A(i)\r
+               if i<>"19" then\r
+                       Throw new System.Exception("ByRef not working")\r
+               End if  \r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/MethodDeclarationD.vb b/mcs/mbas/Test/tests/MethodDeclarationD.vb
new file mode 100755 (executable)
index 0000000..d01a14f
--- /dev/null
@@ -0,0 +1,16 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Function A(ByRef i as Integer)As Integer                         \r
+               i = 19\r
+       End Function\r
+       Sub Main()\r
+               A(10)\r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/MethodDeclarationE.vb b/mcs/mbas/Test/tests/MethodDeclarationE.vb
new file mode 100755 (executable)
index 0000000..3cdc884
--- /dev/null
@@ -0,0 +1,16 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+'To Check if only those parameters that follow Optional must be Optional\r
+\r
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Sub A1(ByVal i as Integer, Optional ByVal j as Integer =10)                     \r
+       End Sub\r
+       Sub Main()\r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/MethodDeclarationF.vb b/mcs/mbas/Test/tests/MethodDeclarationF.vb
new file mode 100755 (executable)
index 0000000..7e6e176
--- /dev/null
@@ -0,0 +1,19 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Module MethodDeclarationA\r
+       Sub A1 ( ByVal ParamArray j() as Date )                 \r
+               Dim i as Date\r
+               For each i in j\r
+               Next i\r
+       End Sub\r
+       Sub Main()\r
+               Dim ar as Date() = {}\r
+               A1(ar) \r
+       End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/PropertyE.vb b/mcs/mbas/Test/tests/PropertyE.vb
new file mode 100755 (executable)
index 0000000..c83015c
--- /dev/null
@@ -0,0 +1,22 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+option Explicit on\r
+Imports System\r
+\r
+Class AB\r
+       Public writeonly Property Prop(a as Integer) as Integer\r
+               set\r
+                       value = 0\r
+               End set\r
+      End Property\r
+End Class\r
+\r
+Module Test\r
+      Public Sub Main()                \r
+       End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/ReturnStatementA.exe b/mcs/mbas/Test/tests/ReturnStatementA.exe
new file mode 100755 (executable)
index 0000000..166837a
Binary files /dev/null and b/mcs/mbas/Test/tests/ReturnStatementA.exe differ
diff --git a/mcs/mbas/Test/tests/StopStatementA.exe b/mcs/mbas/Test/tests/StopStatementA.exe
new file mode 100755 (executable)
index 0000000..6ce5be2
Binary files /dev/null and b/mcs/mbas/Test/tests/StopStatementA.exe differ
diff --git a/mcs/mbas/Test/tests/StopStatementA.vb.log b/mcs/mbas/Test/tests/StopStatementA.vb.log
new file mode 100644 (file)
index 0000000..4d81938
--- /dev/null
@@ -0,0 +1,10 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   StopStatementA.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+syntax error, got token `IDENTIFIER'
+StopStatementA.vb(8,20) error BC29999: Unrecognized Pre-Processor statement
+StopStatementA.vb(9,17) error BC29999: Parsing error
+Compilation failed: 2 Error(s), 0 warnings
diff --git a/mcs/mbas/Test/tests/TestResults.log b/mcs/mbas/Test/tests/TestResults.log
new file mode 100644 (file)
index 0000000..83f093b
--- /dev/null
@@ -0,0 +1,70 @@
+========================
+AssignmentStatementsA.vb: OK
+========================
+AssignmentStatementsB.vb: OK
+========================
+AssignmentStatementsC.vb: FAILED COMPILATION
+========================
+AssignmentStatementsD.vb: OK
+========================
+AssignmentStatementsE.vb: OK
+========================
+AssignmentStatementsF.vb: OK
+========================
+AssignmentStatementsG.vb: OK
+========================
+AssignmentStatementsH.vb: OK
+========================
+AssignmentStatementsI.vb: OK
+========================
+BlockStatementsA.vb: FAILED COMPILATION
+========================
+ConditionalStatementsA.vb: OK
+========================
+ConditionalStatementsB.vb: OK
+========================
+ConditionalStatementsC.vb: FAILED COMPILATION
+========================
+ConditionalStatementsD.vb: FAILED COMPILATION
+========================
+ConditionalStatementsE.vb: OK
+========================
+ConditionalStatementsF.vb: OK
+========================
+ConditionalStatementsG.vb: OK
+========================
+ConditionalStatementsH.vb: OK
+========================
+ConditionalStatementsI.vb: OK
+========================
+ConditionalStatementsJ.vb: OK
+========================
+ExitStatementA.vb: FAILED EXECUTION
+========================
+GotoStatementA.vb: FAILED COMPILATION
+========================
+InvocationStatementA.vb: OK
+========================
+LoopStatementsA.vb: OK
+========================
+LoopStatementsB.vb: OK
+========================
+LoopStatementsC.vb: OK
+========================
+LoopStatementsD.vb: OK
+========================
+LoopStatementsE.vb: FAILED EXECUTION
+========================
+LoopStatementsF.vb: OK
+========================
+LoopStatementsG.vb: FAILED EXECUTION
+========================
+ReturnStatementA.vb: OK
+========================
+StopStatementA.vb: FAILED COMPILATION
+========================
+WithStatementA.vb: OK
+========================
+WithStatementB.vb: FAILED EXECUTION
+========================
+WithStatementC.vb: FAILED COMPILATION
diff --git a/mcs/mbas/Test/tests/VariablesH.vb b/mcs/mbas/Test/tests/VariablesH.vb
new file mode 100755 (executable)
index 0000000..8b5eeef
--- /dev/null
@@ -0,0 +1,20 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Module M\r
+Class A\r
+       Shared public i as Integer\r
+End Class\r
+       Sub Main()\r
+               A.i = A.i+1\r
+               fun()\r
+       End Sub\r
+       Sub fun()\r
+               A.i = A.i+1\r
+               if A.i<>2\r
+                       Throw new System.Exception("Shared variable not workin") \r
+               end if\r
+       End Sub\r
+End Module
diff --git a/mcs/mbas/Test/tests/VariablesI.vb b/mcs/mbas/Test/tests/VariablesI.vb
new file mode 100755 (executable)
index 0000000..77d8d0b
--- /dev/null
@@ -0,0 +1,47 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Class Raiser \r
+       Public Event Constructed() \r
+               Public Sub New() \r
+               RaiseEvent Constructed \r
+       End Sub \r
+End Class \r
+\r
+\r
+Module Test\r
+    Private _x As Raiser\r
+\r
+    Public Property x() As Raiser\r
+        Get\r
+            Return _x\r
+        End Get\r
+\r
+        Set (ByVal Value As Raiser)\r
+            ' Unhook any existing handlers.\r
+            If Not _x Is Nothing Then\r
+                RemoveHandler _x.Constructed, AddressOf HandleConstructed\r
+            End If\r
+\r
+            ' Change value.\r
+            _x = Value\r
+\r
+            ' Hook-up new handlers.\r
+            If Not _x Is Nothing Then\r
+                AddHandler _x.Constructed, AddressOf HandleConstructed\r
+            End If\r
+        End Set\r
+    End Property\r
+\r
+    Sub HandleConstructed()\r
+        Console.WriteLine("Constructed")\r
+    End Sub\r
+\r
+    Sub Main()\r
+        x = New Raiser()\r
+    End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/VariablesJ.vb b/mcs/mbas/Test/tests/VariablesJ.vb
new file mode 100755 (executable)
index 0000000..173c29d
--- /dev/null
@@ -0,0 +1,17 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Module Test\r
+    Structure AB               \r
+           Public Const i as Integer = 10\r
+           Public j as integer         \r
+    End Structure\r
+\r
+    Public Sub Main()\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/VariablesK.vb b/mcs/mbas/Test/tests/VariablesK.vb
new file mode 100755 (executable)
index 0000000..b7cdbf3
--- /dev/null
@@ -0,0 +1,26 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Class A\r
+       Public i as Integer\r
+       Sub New()\r
+               i = 20\r
+       End Sub\r
+       Sub New (a as A)\r
+               i = a.i\r
+       End Sub\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+               dim a as A = new A()\r
+               dim j as A = new A(a)\r
+               if j.i<>20\r
+                       Throw new System.Exception("Initializer not working")\r
+               End if\r
+    End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/VariablesL.vb b/mcs/mbas/Test/tests/VariablesL.vb
new file mode 100755 (executable)
index 0000000..ebc3746
--- /dev/null
@@ -0,0 +1,16 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Module Test\r
+    Sub Main()\r
+        dim b(4, 1) As Integer\r
+\r
+        b(0, 0) = 0: b(0, 1) = 1\r
+        b(1, 0) = 2: b(1, 1) = 3\r
+        b(2, 0) = 4: b(2, 1) = 5\r
+        b(3, 0) = 6: b(3, 1) = 7\r
+        b(4, 0) = 8: b(4, 1) = 9\r
+    End Sub\r
+End Module\r
diff --git a/mcs/mbas/Test/tests/VariablesM.vb b/mcs/mbas/Test/tests/VariablesM.vb
new file mode 100755 (executable)
index 0000000..9df6264
--- /dev/null
@@ -0,0 +1,27 @@
+'Author:
+'   V. Sudharsan (vsudharsan@novell.com)
+'
+' (C) 2005 Novell, Inc.
+
+Imports System\r
+\r
+Class AA\r
+       Inherits System.MarshalByRefObject\r
+       Public Function fun()\r
+       End Function\r
+End Class\r
+\r
+\r
+Class AAA\r
+       Public Function fun(a As AA)            \r
+       End Function\r
+End Class\r
+\r
+Module Test\r
+    Public Sub Main()\r
+               dim b as AA = new AA()\r
+               dim a as AAA = new AAA()\r
+               a.fun(b)\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/WithStatementA.exe b/mcs/mbas/Test/tests/WithStatementA.exe
new file mode 100755 (executable)
index 0000000..80281be
Binary files /dev/null and b/mcs/mbas/Test/tests/WithStatementA.exe differ
diff --git a/mcs/mbas/Test/tests/WithStatementB.exe b/mcs/mbas/Test/tests/WithStatementB.exe
new file mode 100755 (executable)
index 0000000..3026042
Binary files /dev/null and b/mcs/mbas/Test/tests/WithStatementB.exe differ
diff --git a/mcs/mbas/Test/tests/WithStatementB.vb.log b/mcs/mbas/Test/tests/WithStatementB.vb.log
new file mode 100644 (file)
index 0000000..88ad7d3
--- /dev/null
@@ -0,0 +1,13 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   WithStatementB.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+Compilation succeeded: 1 warning(s)
+
+MONO_PATH="../../../class/lib/default::$MONO_PATH" mono  --debug ./WithStatementB.exe
+
+Unhandled Exception: System.Exception: #WS1 - With Statement failed
+in <0x000c0> WithStatementB:main ()
diff --git a/mcs/mbas/Test/tests/WithStatementC.vb.log b/mcs/mbas/Test/tests/WithStatementC.vb.log
new file mode 100644 (file)
index 0000000..03c5327
--- /dev/null
@@ -0,0 +1,9 @@
+
+MONO_PATH="../../../class/lib/default:$MONO_PATH" mono  ../../../mbas/mbas.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /libpath:../../../class/lib/default /imports:System   WithStatementC.vb
+MonoBASIC Compiler  0.95.0.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+Internal warning BC-0018: Cannot find any symbol writer
+WithStatementC.vb(16,21) error BC30132: No such label `labelA' in this scope
+Compilation failed: 1 Error(s), 1 warnings
diff --git a/mcs/mbas/Test/tests/test.vb b/mcs/mbas/Test/tests/test.vb
new file mode 100644 (file)
index 0000000..970d228
--- /dev/null
@@ -0,0 +1,17 @@
+'Author:\r
+'   V. Sudharsan (vsudharsan@novell.com)\r
+'\r
+' (C) 2005 Novell, Inc.\r
+\r
+Module Test\r
+    Sub Main() \r
+       Dim i as integer \r
+        i = 20-10.5\r
+       System.Console.WriteLine(20-10.5)\r
+       System.Console.WriteLine("i is {0}",i)\r
+'      if i<>15 then\r
+'              Throw New System.Exception("Select not working properly. Expected 15 but got "&i)\r
+'      End if\r
+    End Sub\r
+End Module\r
+\r
diff --git a/mcs/mbas/Test/tests/test1.vb b/mcs/mbas/Test/tests/test1.vb
new file mode 100644 (file)
index 0000000..4cd2f71
--- /dev/null
@@ -0,0 +1,24 @@
+Imports System\r
+\r
+Module ConditionalStatementsC\r
+\r
+    Sub Main()\r
+\r
+        Dim i As Integer\r
+        Dim arr(10) As Integer\r
+\r
+        For i = 0 To 10\r
+\r
+            Select Case i\r
+                Case 0 To 4\r
+                'Case 0 \r
+                    'arr(i) = 1\r
+               Console.WriteLine("MANJU i is {0}",i)\r
+            End Select\r
+\r
+        Next\r
+\r
+\r
+    End Sub\r
+\r
+End Module\r