summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArrays
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArrays')
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js5
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js5
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js5
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js5
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js10
-rw-r--r--test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab.js5
-rw-r--r--test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size.js5
-rw-r--r--test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size-sab.js5
-rw-r--r--test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size.js5
13 files changed, 15 insertions, 59 deletions
diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js
index 932cfb3c9..73de6c060 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js
@@ -23,11 +23,6 @@ features: [BigInt, SharedArrayBuffer, TypedArray]
var buffer = new SharedArrayBuffer(1);
testWithBigIntTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
index f5f71f3d2..171ea96a4 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js
@@ -22,11 +22,6 @@ features: [BigInt, TypedArray]
var buffer = new ArrayBuffer(1);
testWithBigIntTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js
index 7e9b40e66..0782f270d 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js
@@ -22,11 +22,6 @@ features: [BigInt, SharedArrayBuffer, TypedArray]
var buffer = new SharedArrayBuffer(8);
testWithBigIntTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer, 7);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js
index e511bc394..9e4f26ee6 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js
@@ -21,11 +21,6 @@ features: [BigInt, TypedArray]
var buffer = new ArrayBuffer(8);
testWithBigIntTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer, 7);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js
index 435136a08..44b76c2b9 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js
@@ -27,11 +27,11 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
-var sample1 = new Int8Array();
-var sample2 = new Int16Array();
+var sample1 = new BigInt64Array();
+var sample2 = new BigUint64Array();
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = TA === Int8Array ? sample2 : sample1;
+ var sample = TA === BigInt64Array ? sample2 : sample1;
sample.buffer.constructor = 1;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js
index 8b0206361..8b3933eed 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js
@@ -25,11 +25,11 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol.species, TypedArray]
---*/
-var sample1 = new Int8Array();
-var sample2 = new Int16Array();
+var sample1 = new BigInt64Array();
+var sample2 = new BigUint64Array();
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = TA === Int8Array ? sample2 : sample1;
+ var sample = TA === BigInt64Array ? sample2 : sample1;
var ctor = {};
sample.buffer.constructor = ctor;
diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js
index 338a63b20..09a8068e9 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js
@@ -27,8 +27,8 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol.species, TypedArray]
---*/
-var sample1 = new Int8Array();
-var sample2 = new Int16Array();
+var sample1 = new BigInt64Array();
+var sample2 = new BigUint64Array();
var ctor = function() {
throw new Test262Error();
@@ -37,7 +37,7 @@ var m = { m() {} }.m;
ctor[Symbol.species] = m;
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = TA === Int8Array ? sample2 : sample1;
+ var sample = TA === BigInt64Array ? sample2 : sample1;
sample.buffer.constructor = ctor;
diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js
index dea4919af..705b8a731 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js
@@ -35,11 +35,11 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol.species, TypedArray]
---*/
-var sample1 = new Int8Array();
-var sample2 = new Int16Array();
+var sample1 = new BigInt64Array();
+var sample2 = new BigUint64Array();
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = TA === Int8Array ? sample2 : sample1;
+ var sample = TA === BigInt64Array ? sample2 : sample1;
var ctor = {};
var called = 0;
diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js
index 2c87901fd..754abcd42 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js
@@ -14,15 +14,11 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
-var sample1 = new Int8Array(7);
-var sample2 = new Int16Array(7);
-var sample3 = new BigInt64Array(7);
-var sample4 = new BigUint64Array(7);
+var sample1 = new BigInt64Array();
+var sample2 = new BigUint64Array();
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = TA === Int8Array ? sample2 :
- TA === BigInt64Array ? sample4 :
- TA === BigUint64Array ? sample3 : sample1;
+ var sample = TA === BigInt64Array ? sample2 : sample1;
var typedArray = new TA(sample);
assert.sameValue(typedArray.length, 7);
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab.js
index 707aa00be..b07837b84 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab.js
@@ -23,11 +23,6 @@ features: [SharedArrayBuffer, TypedArray]
var buffer = new SharedArrayBuffer(1);
testWithTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer);
});
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size.js
index a886e5afd..1c916b43c 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size.js
@@ -22,11 +22,6 @@ features: [TypedArray]
var buffer = new ArrayBuffer(1);
testWithTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer);
});
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size-sab.js
index 79b398ccf..645f259af 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size-sab.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size-sab.js
@@ -22,11 +22,6 @@ features: [SharedArrayBuffer, TypedArray]
var buffer = new SharedArrayBuffer(8);
testWithTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer, 7);
});
diff --git a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size.js
index 479f0d5dc..f495e6bcc 100644
--- a/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size.js
+++ b/test/built-ins/TypedArrays/ctors/buffer-arg/buffer-arg-byteoffset-throws-from-modulo-element-size.js
@@ -21,11 +21,6 @@ features: [TypedArray]
var buffer = new ArrayBuffer(8);
testWithTypedArrayConstructors(function(TA) {
- if (TA.BYTES_PER_ELEMENT === 1) {
- // Impossible to trigger this step here.
- return;
- }
-
assert.throws(RangeError, function() {
new TA(buffer, 7);
});