Index: test/mjsunit/harmony/reflect-apply.js |
diff --git a/test/mjsunit/harmony/reflect-apply.js b/test/mjsunit/harmony/reflect-apply.js |
index 2cfb98282bbc21c5ef30f38183acefcb30142f47..3d37354dd90e21b827aba0c5ead1dede7673b6ac 100644 |
--- a/test/mjsunit/harmony/reflect-apply.js |
+++ b/test/mjsunit/harmony/reflect-apply.js |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// Flags: --harmony-reflect |
+// Flags: --harmony-reflect --harmony-simd |
(function testReflectApplyArity() { |
@@ -36,6 +36,9 @@ |
assertSame(Symbol.prototype, |
Object.getPrototypeOf( |
Reflect.apply(returnThis, Symbol("test"), []))); |
+ assertSame(SIMD.float32x4.prototype, |
+ Object.getPrototypeOf( |
+ Reflect.apply(returnThis, SIMD.float32x4(1, 2, 3, 4), []))); |
})(); |
@@ -50,11 +53,13 @@ |
// Don't wrap value types |
var regexp = /123/; |
var symbol = Symbol("test"); |
+ var float32x4 = SIMD.float32x4(1, 2, 3, 4); |
assertSame("str", Reflect.apply(returnThis, "str", [])); |
assertSame(123, Reflect.apply(returnThis, 123, [])); |
assertSame(true, Reflect.apply(returnThis, true, [])); |
assertSame(regexp, Reflect.apply(returnThis, regexp, [])); |
assertSame(symbol, Reflect.apply(returnThis, symbol, [])); |
+ assertSame(float32x4, Reflect.apply(returnThis, float32x4, [])); |
})(); |
@@ -123,6 +128,8 @@ |
assertThrows(function() { Reflect.apply(123); }, TypeError); |
assertThrows(function() { Reflect.apply("str"); }, TypeError); |
assertThrows(function() { Reflect.apply(Symbol("x")); }, TypeError); |
+ assertThrows( |
+ function() { Reflect.apply(SIMD.float32x4(1, 2, 3, 4)); }, TypeError); |
assertThrows(function() { Reflect.apply(/123/); }, TypeError); |
assertThrows(function() { Reflect.apply(NaN); }, TypeError); |
assertThrows(function() { Reflect.apply({}); }, TypeError); |
@@ -136,6 +143,8 @@ |
assertThrows(function() { Reflect.apply(123); }, TypeError); |
assertThrows(function() { Reflect.apply("str"); }, TypeError); |
assertThrows(function() { Reflect.apply(Symbol("x")); }, TypeError); |
+ assertThrows( |
+ function() { Reflect.apply(SIMD.float32x4(1, 2, 3, 4)); }, TypeError); |
assertThrows(function() { Reflect.apply(/123/); }, TypeError); |
assertThrows(function() { Reflect.apply(NaN); }, TypeError); |
assertThrows(function() { Reflect.apply({}); }, TypeError); |
@@ -158,6 +167,11 @@ |
var sym = Symbol("x"); |
assertThrows(function() { Reflect.apply(noopStrict, R, sym); }, TypeError); |
assertThrows(function() { Reflect.apply(noopSloppy, R, sym); }, TypeError); |
+ var float32x4 = SIMD.float32x4(1, 2, 3, 4); |
+ assertThrows( |
+ function() { Reflect.apply(noopStrict, R, float32x4); }, TypeError); |
+ assertThrows( |
+ function() { Reflect.apply(noopSloppy, R, float32x4); }, TypeError); |
})(); |