Don't let the last tests fail

This commit is contained in:
Andrey Breslav
2013-10-14 08:21:45 +04:00
parent e9edc70758
commit b5f43dcc2d
@@ -93,8 +93,6 @@ fun suite(): TestSuite {
eval eval
) )
if (remainingTests.decrementAndGet() == 0) vm.resume()
fun jdi.ObjectReference?.callToString(): String? { fun jdi.ObjectReference?.callToString(): String? {
if (this == null) return "null" if (this == null) return "null"
return (eval.invokeMethod( return (eval.invokeMethod(
@@ -109,6 +107,7 @@ fun suite(): TestSuite {
} }
try {
if (value is ExceptionThrown) { if (value is ExceptionThrown) {
val str = value.exception.jdiObj.callToString() val str = value.exception.jdiObj.callToString()
System.err.println("Exception: $str") System.err.println("Exception: $str")
@@ -121,6 +120,11 @@ fun suite(): TestSuite {
assertEquals(expected, value) assertEquals(expected, value)
} }
} }
finally {
if (remainingTests.decrementAndGet() == 0) vm.resume()
}
}
} }
} }