Permalink
Browse files

Properly return != 0 on error.

svn path=/trunk/mono/; revision=26049
  • Loading branch information...
1 parent 102167b commit fcdb1b8846a8b4fe13e03afe0a1c5560ae601928 @illupus illupus committed Apr 27, 2004
Showing with 20 additions and 3 deletions.
  1. +20 −3 mono/tests/ckfiniteTest.il
View
@@ -12,9 +12,12 @@
.class private auto ansi someTest
extends [mscorlib]System.Object {
- .method public static void go() cil managed {
+ .method public static int32 Main() cil managed {
.entrypoint
+ .locals (int32 res)
+ ldc.i4 3
+ stloc res
//TEST 1 - infinite
.try {
@@ -30,6 +33,10 @@ catch [mscorlib]System.ArithmeticException {
pop
ldstr "PASS"
call void [mscorlib]System.Console::WriteLine(string)
+ ldloc res
+ ldc.i4 1
+ sub
+ stloc res
leave test2
}
catch [mscorlib]System.Exception {
@@ -54,6 +61,10 @@ test2: nop
catch [mscorlib]System.ArithmeticException {
ldstr "PASS"
call void [mscorlib]System.Console::WriteLine(string)
+ ldloc res
+ ldc.i4 1
+ sub
+ stloc res
leave test3
}
catch [mscorlib]System.Exception {
@@ -72,6 +83,10 @@ test3: nop
bne.un FAIL
ldstr "PASS"
call void [mscorlib]System.Console::WriteLine(string)
+ ldloc res
+ ldc.i4 1
+ sub
+ stloc res
leave end
FAIL: ldstr "FAIL"
@@ -84,8 +99,10 @@ catch [mscorlib]System.Exception {
leave end
}
-end: ret
+end:
+ ldloc res
+ ret
}
-}
+}

0 comments on commit fcdb1b8

Please sign in to comment.