Index: test/mjsunit/object-freeze.js |
diff --git a/test/mjsunit/object-freeze.js b/test/mjsunit/object-freeze.js |
index 3eefffda311a2dfc9490b9e04a09eb1645c04c1f..c3a9278bbd9c4629489f143e52cedba78684ddb4 100644 |
--- a/test/mjsunit/object-freeze.js |
+++ b/test/mjsunit/object-freeze.js |
@@ -32,21 +32,25 @@ |
// Test that we throw an error if an object is not passed as argument. |
var non_objects = new Array(undefined, null, 1, -1, 0, 42.43); |
for (var key in non_objects) { |
+ var exception = false; |
try { |
Object.freeze(non_objects[key]); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/Object.freeze called on non-object/.test(e)); |
} |
+ assertTrue(exception); |
} |
for (var key in non_objects) { |
+ exception = false; |
try { |
Object.isFrozen(non_objects[key]); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/Object.isFrozen called on non-object/.test(e)); |
} |
+ assertTrue(exception); |
} |
// Test normal data properties. |