Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2007-12-07 Zoltan Varga <vargaz@gmail.com>

	* checked.cs: Make exit codes positive.

svn path=/trunk/mono/; revision=90928
  • Loading branch information...
commit 3c0510cea751d4b03ab5379e3e82fabdb8d12b60 1 parent 6860fad
@vargaz vargaz authored
Showing with 21 additions and 17 deletions.
  1. +4 −0 mono/tests/ChangeLog
  2. +17 −17 mono/tests/checked.cs
View
4 mono/tests/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-07 Zoltan Varga <vargaz@gmail.com>
+
+ * checked.cs: Make exit codes positive.
+
2007-12-05 Zoltan Varga <vargaz@gmail.com>
* Makefile.am (EXTRA_DIST): Add a missing file.
View
34 mono/tests/checked.cs
@@ -25,7 +25,7 @@ public class tester {
if (!exception)
- return -1;
+ return 1;
exception = false;
@@ -37,12 +37,12 @@ public class tester {
i = (int)a;
}
} catch (Exception) {
- return -2;
+ return 2;
}
if (i != 100000)
- return -3;
+ return 3;
exception = false;
@@ -78,7 +78,7 @@ public class tester {
if (!exception)
- return -4;
+ return 4;
a = 1e5f;
try {
@@ -88,11 +88,11 @@ public class tester {
}
}
catch (Exception) {
- return -5;
+ return 5;
}
if (ui != 100000)
- return -6;
+ return 6;
// Check mul.ovf
checked {
@@ -112,7 +112,7 @@ public class tester {
for (int j = 0; j < cases.Length; ++j)
if (cases [j][0] * cases [j][1] != cases [j][2])
- return -7 - j;
+ return 7 + j;
}
checked {
@@ -121,47 +121,47 @@ public class tester {
j = k = 0;
if (j * k != 0)
- return -7;
+ return 20;
j = -5;
k = 0;
if (j * k != 0)
- return -8;
+ return 21;
j = 0;
k = -5;
if (j * k != 0)
- return -9;
+ return 22;
j = 3;
k = -5;
if (j * k != -15)
- return -10;
+ return 23;
j = 3;
k = 5;
if (j * k != 15)
- return -11;
+ return 24;
j = -3;
k = -5;
if (j * k != 15)
- return -12;
+ return 25;
j = -3;
k = 5;
if (j * k != -15)
- return -13;
+ return 26;
j = -1;
k = 32767;
if (j * k != -32767)
- return -14;
+ return 27;
j = 32767;
k = -1;
if (j * k != -32767)
- return -15;
+ return 28;
}
checked {
@@ -180,7 +180,7 @@ public class tester {
for (int j = 0; j < cases.Length; ++j)
if (cases [j][0] * cases [j][1] != cases [j][2])
- return -15 - j;
+ return 29 + j;
}
Console.WriteLine("test-ok");
Please sign in to comment.
Something went wrong with that request. Please try again.