Index: test/mjsunit/harmony/reflect.js |
diff --git a/test/mjsunit/harmony/reflect.js b/test/mjsunit/harmony/reflect.js |
index 84709ba0cf8ed506e97a02376c235d2ff0954790..73d0115db916f3d7041ae3333d7dc9f059e09220 100644 |
--- a/test/mjsunit/harmony/reflect.js |
+++ b/test/mjsunit/harmony/reflect.js |
@@ -239,7 +239,7 @@ function prepare(tgt) { |
})(); |
-(function testReflectDeletePropertyOnNonObject() { |
+(function testReflectGetPrototypeOnNonObject() { |
assertThrows(function() { Reflect.getPrototypeOf(); }, TypeError); |
assertThrows(function() { Reflect.getPrototypeOf(42); }, TypeError); |
assertThrows(function() { Reflect.getPrototypeOf(null); }, TypeError); |
@@ -251,6 +251,32 @@ function prepare(tgt) { |
//////////////////////////////////////////////////////////////////////////////// |
+// Reflect.setPrototypeOf |
+ |
+ |
+(function testReflectSetPrototypeOfArity() { |
+ assertEquals(2, Reflect.setPrototypeOf.length); |
+})(); |
+ |
+ |
+(function testReflectSetPrototypeOfOnNonObject() { |
+ assertThrows(function() { Reflect.setPrototypeOf(undefined, {}); }, |
+ TypeError); |
+ assertThrows(function() { Reflect.setPrototypeOf(42, {}); }, TypeError); |
+ assertThrows(function() { Reflect.setPrototypeOf(null, {}); }, TypeError); |
+ |
+ assertThrows(function() { Reflect.setPrototypeOf({}, undefined); }, |
+ TypeError); |
+ assertThrows(function() { Reflect.setPrototypeOf({}, 42); }, TypeError); |
+ assertTrue(Reflect.setPrototypeOf({}, null)); |
+})(); |
+ |
+ |
+// See reflect-set-prototype-of.js for further tests. |
+ |
+ |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
// Reflect.isExtensible |