summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/test/mjsunit/mjsunit.js
diff options
context:
space:
mode:
Diffstat (limited to 'V8Binding/v8/test/mjsunit/mjsunit.js')
-rw-r--r--V8Binding/v8/test/mjsunit/mjsunit.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/V8Binding/v8/test/mjsunit/mjsunit.js b/V8Binding/v8/test/mjsunit/mjsunit.js
index 2c52a31..1fb3f02 100644
--- a/V8Binding/v8/test/mjsunit/mjsunit.js
+++ b/V8Binding/v8/test/mjsunit/mjsunit.js
@@ -179,9 +179,13 @@ function assertInstanceof(obj, type) {
function assertDoesNotThrow(code) {
try {
- eval(code);
+ if (typeof code == 'function') {
+ code();
+ } else {
+ eval(code);
+ }
} catch (e) {
- assertTrue(false, "threw an exception");
+ assertTrue(false, "threw an exception: " + (e.message || e));
}
}