From a9827c945dcf0c170008adf85f3685e557897569 Mon Sep 17 00:00:00 2001 From: Valerie R Young <valerie@bocoup.com> Date: Tue, 13 Mar 2018 13:47:29 -0400 Subject: [PATCH] BigInt: fix TypedArray fncs expecting BigInt for cmp --- .../prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js | 2 +- .../fill/BigInt/return-abrupt-from-start-as-symbol.js | 2 +- .../TypedArray/prototype/includes/BigInt/detached-buffer.js | 2 +- .../BigInt/fromIndex-equal-or-greater-length-returns-false.js | 4 ++-- .../prototype/includes/BigInt/length-zero-returns-false.js | 2 +- .../TypedArray/prototype/indexOf/BigInt/detached-buffer.js | 2 +- .../fromIndex-equal-or-greater-length-returns-minus-one.js | 4 ++-- .../prototype/indexOf/BigInt/length-zero-returns-minus-one.js | 4 ++-- .../BigInt/return-abrupt-tointeger-fromindex-symbol.js | 2 +- .../indexOf/BigInt/return-abrupt-tointeger-fromindex.js | 2 +- .../prototype/lastIndexOf/BigInt/detached-buffer.js | 2 +- .../lastIndexOf/BigInt/length-zero-returns-minus-one.js | 2 +- .../BigInt/return-abrupt-tointeger-fromindex-symbol.js | 2 +- .../lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js index 084c9ac1e7..69ad955b68 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end-as-symbol.js @@ -33,6 +33,6 @@ var end = Symbol(1); testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert.throws(TypeError, function() { - sample.fill(1, 0, end); + sample.fill(1n, 0, end); }); }); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js index d95c9a30d8..73c2417867 100644 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js +++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start-as-symbol.js @@ -32,6 +32,6 @@ var start = Symbol(1); testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert.throws(TypeError, function() { - sample.fill(1, start); + sample.fill(1n, start); }); }); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js index 990e4b01a8..0239cca34a 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/detached-buffer.js @@ -23,6 +23,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.throws(TypeError, function() { - sample.includes(0); + sample.includes(0n); }); }); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js index a59b7084a5..a36d4d415b 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-equal-or-greater-length-returns-false.js @@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample; sample = new TA(42); - assert.sameValue(sample.includes(0, 42), false); - assert.sameValue(sample.includes(0, 43), false); + assert.sameValue(sample.includes(0n, 42), false); + assert.sameValue(sample.includes(0n, 43), false); }); diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js index 9c06fa6c1d..1ceaa37bc9 100644 --- a/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js +++ b/test/built-ins/TypedArray/prototype/includes/BigInt/length-zero-returns-false.js @@ -33,7 +33,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue(sample.includes(0), false, "returns false"); assert.sameValue(sample.includes(), false, "returns false - no arg"); assert.sameValue( - sample.includes(0, fromIndex), false, + sample.includes(0n, fromIndex), false, "length is checked before ToInteger(fromIndex)" ); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js index 1d44ab16d8..757baf77c7 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/detached-buffer.js @@ -23,6 +23,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.throws(TypeError, function() { - sample.indexOf(0); + sample.indexOf(0n); }); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js index 022f4a1567..a7bc3e50a0 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-equal-or-greater-length-returns-minus-one.js @@ -25,6 +25,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample; sample = new TA(42); - assert.sameValue(sample.indexOf(0, 42), -1); - assert.sameValue(sample.indexOf(0, 43), -1); + assert.sameValue(sample.indexOf(0n, 42), -1); + assert.sameValue(sample.indexOf(0n, 43), -1); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js index 510a58f7bb..2c679e4914 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/length-zero-returns-minus-one.js @@ -29,9 +29,9 @@ var fromIndex = { testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); - assert.sameValue(sample.indexOf(0), -1, "returns -1"); + assert.sameValue(sample.indexOf(0n), -1, "returns -1"); assert.sameValue( - sample.indexOf(0, fromIndex), -1, + sample.indexOf(0n, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js index 843a22a29c..a4e3dfccbc 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js @@ -27,6 +27,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); assert.throws(TypeError, function() { - sample.indexOf(7, fromIndex); + sample.indexOf(7n, fromIndex); }); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js index 751b482b93..f5063efa06 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/return-abrupt-tointeger-fromindex.js @@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); assert.throws(Test262Error, function() { - sample.indexOf(7, fromIndex); + sample.indexOf(7n, fromIndex); }); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js index 616f96ce5a..70e471654c 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/detached-buffer.js @@ -23,6 +23,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); $DETACHBUFFER(sample.buffer); assert.throws(TypeError, function() { - sample.lastIndexOf(0); + sample.lastIndexOf(0n); }); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js index 07fc5da726..9676e2d5df 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/length-zero-returns-minus-one.js @@ -31,7 +31,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert.sameValue(sample.lastIndexOf(0), -1, "returns -1"); assert.sameValue( - sample.lastIndexOf(0, fromIndex), -1, + sample.lastIndexOf(0n, fromIndex), -1, "length is checked before ToInteger(fromIndex)" ); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js index 67c1ea4c62..5f4f01d63d 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex-symbol.js @@ -27,6 +27,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); assert.throws(TypeError, function() { - sample.lastIndexOf(7, fromIndex); + sample.lastIndexOf(7n, fromIndex); }); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js index 2f3465b343..ca2eb82d71 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/return-abrupt-tointeger-fromindex.js @@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(1); assert.throws(Test262Error, function() { - sample.lastIndexOf(7, fromIndex); + sample.lastIndexOf(7n, fromIndex); }); }); -- GitLab