mirror of https://github.com/tc39/test262.git
BigInt: fix TypedArray fncs expecting BigInt for cmp
This commit is contained in:
parent
fcb5207932
commit
a9827c945d
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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)"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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)"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -27,6 +27,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
var sample = new TA(1);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
sample.indexOf(7, fromIndex);
|
||||
sample.indexOf(7n, fromIndex);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
var sample = new TA(1);
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
sample.indexOf(7, fromIndex);
|
||||
sample.indexOf(7n, fromIndex);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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)"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -27,6 +27,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
var sample = new TA(1);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
sample.lastIndexOf(7, fromIndex);
|
||||
sample.lastIndexOf(7n, fromIndex);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
var sample = new TA(1);
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
sample.lastIndexOf(7, fromIndex);
|
||||
sample.lastIndexOf(7n, fromIndex);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue