2004-08-14 Bernie Solomon <bernard@ugsolutions.com>
authorBernie Solomon <bernard@mono-cvs.ximian.com>
Sun, 15 Aug 2004 01:51:27 +0000 (01:51 -0000)
committerBernie Solomon <bernard@mono-cvs.ximian.com>
Sun, 15 Aug 2004 01:51:27 +0000 (01:51 -0000)
* ForEachA.vb:
* Test.Sources: new test

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

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

index 6fce04f2a93d95e02414678958413c0f35a7b1f7..c5ab874f81e4b289f45d2e6f9b3e4f45ea4951f4 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-14 Bernie Solomon <bernard@ugsolutions.com>
+       * ForEachA.vb:
+       * Test.Sources: new test
+
 2004-08-12 Sachin Kumar <skumar1@novell.com>
        * WithStatementA.vb:
        * WithStatementB.vb:
diff --git a/mcs/btests/ForEachA.vb b/mcs/btests/ForEachA.vb
new file mode 100644 (file)
index 0000000..66d9da0
--- /dev/null
@@ -0,0 +1,29 @@
+Imports System
+
+Module M
+       Sub Main
+               Dim a As Integer() = { 1, 2, 3}
+               Dim b As Integer
+               Dim c As Integer = 0
+               For Each b In a
+                       c = c + b
+                       c = c + 1
+               Next
+               If c <> 9 Then
+                       Throw New Exception("#A1: count is wrong")
+               End If
+               c = 0
+               For Each b In a
+                       c = c + b
+                       c = c + 1
+                       Dim d As Integer
+                       For Each d In a
+                               c = c + d
+                       Next
+               Next
+               If c <> 27 Then
+                       Throw New Exception("#A2: count is wrong")
+               End If
+       End Sub
+End Module
+
index 6ed02bca6020fd5ee6d1d582ca662c0febe0ba8b..15bf1538962efa5766ff6cadccde52432bf86305 100644 (file)
@@ -63,7 +63,6 @@ LiteralNothing \
 ConditionalCompilation \
 ConditionalCompilationA \
 ConditionalCompilationB \
-ConditionalCompilationC \
 ConditionalCompilationD \
 ConditionalCompilationE \
 ConditionalConstants \
@@ -174,7 +173,8 @@ LocalVariablesA \
 LocalVariablesB \
 LocalDeclarationA \
 WithStatementA \
-WithStatementB
+WithStatementB \
+ForEachA
 
 # All negetive test cases which should
 # fail during compilation goes here