Index: test/mjsunit/es6/reflect-construct.js |
diff --git a/test/mjsunit/es6/reflect-construct.js b/test/mjsunit/es6/reflect-construct.js |
index 4661b4093b3014a72b6153f45ab2b965c62bb283..9de515800531076ad7c59c57a8e921dedf25c08f 100644 |
--- a/test/mjsunit/es6/reflect-construct.js |
+++ b/test/mjsunit/es6/reflect-construct.js |
@@ -17,6 +17,30 @@ |
})(); |
+(function testReflectConstructArg1NonConstructor() { |
+ try { |
+ Reflect.construct(() => {}, []); |
+ } catch (e) { |
+ assertInstanceof(e, TypeError); |
+ assertEquals("() => {} is not a constructor", e.message); |
+ return; |
+ } |
+ assertUnreachable("Exception expected"); |
+})(); |
+ |
+ |
+(function testReflectConstructArg3NonConstructor() { |
+ try { |
+ Reflect.construct(function() {}, [], () => {}); |
+ } catch (e) { |
+ assertInstanceof(e, TypeError); |
+ assertEquals("() => {} is not a constructor", e.message); |
+ return; |
+ } |
+ assertUnreachable("Exception expected"); |
+})(); |
+ |
+ |
(function testReflectConstructBasic() { |
function Constructor() { "use strict"; } |
assertInstanceof(Reflect.construct(Constructor, []), Constructor); |