Index: test/mjsunit/object-seal.js |
diff --git a/test/mjsunit/object-seal.js b/test/mjsunit/object-seal.js |
index fb9bb9215978b6f228e229b9415832b3b0ecf8ab..f21baed37711d954d309bc9009d534c998583778 100644 |
--- a/test/mjsunit/object-seal.js |
+++ b/test/mjsunit/object-seal.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.seal(non_objects[key]); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/Object.seal called on non-object/.test(e)); |
} |
+ assertTrue(exception); |
} |
for (var key in non_objects) { |
+ exception = false; |
try { |
Object.isSealed(non_objects[key]); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/Object.isSealed called on non-object/.test(e)); |
} |
+ assertTrue(exception); |
} |
// Test normal data properties. |