| Index: test/mjsunit/mjsunit.js
|
| diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
|
| index 2c52a31e604451065363bc1fc90d1452a7b20427..1fb3f02afba9768109bee5dd34edcfdee3b0d12c 100644
|
| --- a/test/mjsunit/mjsunit.js
|
| +++ b/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));
|
| }
|
| }
|
|
|
|
|