X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fchecked.cs;h=f0ee56973232e2f5a04e76fced36357dd008a7a2;hb=e90eb269935e8974e24342289d4088a9b200a201;hp=87c3f2ab23b98203c721087ce7fbef6bf7c6f722;hpb=e51a9b6ba1a93bc981639a706c93bee413099fd6;p=mono.git diff --git a/mono/tests/checked.cs b/mono/tests/checked.cs index 87c3f2ab23b..f0ee5697323 100644 --- a/mono/tests/checked.cs +++ b/mono/tests/checked.cs @@ -25,7 +25,7 @@ namespace test { if (!exception) - return -1; + return 1; exception = false; @@ -37,12 +37,12 @@ namespace test { i = (int)a; } } catch (Exception) { - return -2; + return 2; } if (i != 100000) - return -3; + return 3; exception = false; @@ -78,7 +78,7 @@ namespace test { if (!exception) - return -4; + return 4; a = 1e5f; try { @@ -88,11 +88,11 @@ namespace test { } } catch (Exception) { - return -5; + return 5; } if (ui != 100000) - return -6; + return 6; // Check mul.ovf checked { @@ -112,7 +112,7 @@ namespace test { 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 @@ namespace test { 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 @@ namespace test { 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");