diff options
Diffstat (limited to 'js/src/tests/non262/ArrayBuffer/constructorNotCallable.js')
-rw-r--r-- | js/src/tests/non262/ArrayBuffer/constructorNotCallable.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/tests/non262/ArrayBuffer/constructorNotCallable.js b/js/src/tests/non262/ArrayBuffer/constructorNotCallable.js new file mode 100644 index 0000000000..9df97fe867 --- /dev/null +++ b/js/src/tests/non262/ArrayBuffer/constructorNotCallable.js @@ -0,0 +1,8 @@ +assertThrowsInstanceOf(() => ArrayBuffer(), TypeError); +assertThrowsInstanceOf(() => ArrayBuffer(1), TypeError); +assertThrowsInstanceOf(() => ArrayBuffer.call(null), TypeError); +assertThrowsInstanceOf(() => ArrayBuffer.apply(null, []), TypeError); +assertThrowsInstanceOf(() => Reflect.apply(ArrayBuffer, null, []), TypeError); + +if (typeof reportCompare === 'function') + reportCompare(0,0,"OK"); |