Index: test/mjsunit/harmony/reflect.js |
diff --git a/test/mjsunit/harmony/reflect.js b/test/mjsunit/harmony/reflect.js |
index fc52c93d197c598978064b710f1e57648a44c691..e23c927733f203fa9a258a5dbbf0f69049097411 100644 |
--- a/test/mjsunit/harmony/reflect.js |
+++ b/test/mjsunit/harmony/reflect.js |
@@ -256,3 +256,26 @@ function prepare(tgt) { |
assertFalse(Reflect.isExtensible(tgt)); |
} |
})(); |
+ |
+ |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
+// Reflect.preventExtensions |
+ |
+ |
+(function testReflectPreventExtensionsArity() { |
+ assertEquals(1, Reflect.preventExtensions.length); |
+})(); |
+ |
+ |
+(function testReflectPreventExtensionsOnNonObject() { |
+ assertThrows(function() { Reflect.preventExtensions(); }, TypeError); |
+ assertThrows(function() { Reflect.preventExtensions(42); }, TypeError); |
+ assertThrows(function() { Reflect.preventExtensions(null); }, TypeError); |
+})(); |
+ |
+ |
+// See reflect-prevent-extensions.js for further tests. |
+ |
+// TODO(neis): Need proxies to test the situation where |
+// [[preventExtensions]] returns false. |