Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2001-11-15 01:58:59 +0300
committerMiguel de Icaza <miguel@gnome.org>2001-11-15 01:58:59 +0300
commitb623f18d204e290c2467f1db403c85700973c8ee (patch)
treee2005e87251f5da9468c2f87d8594b39d9fac1b3 /mcs/tests/test-42.cs
parent02b414cf9cd1ec416db3661558e9c618fabe528a (diff)
Force test-34 to fail and exhibit the bug
svn path=/trunk/mcs/; revision=1355
Diffstat (limited to 'mcs/tests/test-42.cs')
-rwxr-xr-xmcs/tests/test-42.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/mcs/tests/test-42.cs b/mcs/tests/test-42.cs
index 10d4558c960..684324b8f93 100755
--- a/mcs/tests/test-42.cs
+++ b/mcs/tests/test-42.cs
@@ -110,7 +110,7 @@ class Y {
static int arrays ()
{
int [] a = new int [10];
- int i;
+ int i, j;
for (i = 0; i < 10; i++)
a [i]++;
@@ -118,6 +118,25 @@ class Y {
for (i = 0; i < 10; i++)
if (a [i] != 1)
return 100;
+
+ int [,] b = new int [10,10];
+ for (i = 0; i < 10; i++){
+ for (j = 0; j < 10; j++){
+ b [i,j] = i * 10 + j;
+ if (i < 5)
+ b [i,j]++;
+ else
+ ++b [i,j];
+ }
+ }
+
+ for (i = 0; i < 10; i++){
+ for (j = 0; j < 10; j++){
+ if (b [i,j] != i * 10 + (j + 1))
+ return 101;
+ }
+ }
+
return 0;
}