mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 05:24:38 +02:00
BigInt: fix, set only BigInts to index to avoid false negatives
This commit is contained in:
parent
324c18038b
commit
3f96092cb9
@ -29,7 +29,7 @@ features: [BigInt, cross-realm, Reflect, TypedArray]
|
|||||||
|
|
||||||
var other = $262.createRealm().global;
|
var other = $262.createRealm().global;
|
||||||
var desc = {
|
var desc = {
|
||||||
value: 0,
|
value: 0n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -27,7 +27,7 @@ features: [BigInt, Reflect, TypedArray]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var desc = {
|
var desc = {
|
||||||
value: 0,
|
value: 0n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -25,7 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "2", {
|
Reflect.defineProperty(sample, "2", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "3", {
|
Reflect.defineProperty(sample, "3", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "-1", {
|
Reflect.defineProperty(sample, "-1", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "-0", {
|
Reflect.defineProperty(sample, "-0", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -21,7 +21,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "0.1", {
|
Reflect.defineProperty(sample, "0.1", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "0.000001", {
|
Reflect.defineProperty(sample, "0.000001", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
@ -58,7 +58,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "1.1", {
|
Reflect.defineProperty(sample, "1.1", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
@ -75,7 +75,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "Infinity", {
|
Reflect.defineProperty(sample, "Infinity", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
@ -99,7 +99,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "-Infinity", {
|
Reflect.defineProperty(sample, "-Infinity", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "0", {
|
Reflect.defineProperty(sample, "0", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: true,
|
configurable: true,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "0", {
|
Reflect.defineProperty(sample, "0", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
writable: true
|
writable: true
|
||||||
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Reflect.defineProperty(sample, "0", {
|
Reflect.defineProperty(sample, "0", {
|
||||||
value: 42,
|
value: 42n,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: false
|
writable: false
|
||||||
|
@ -35,6 +35,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||||||
$DETACHBUFFER(sample.buffer);
|
$DETACHBUFFER(sample.buffer);
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
sample[0] = 0;
|
sample[0] = 0n;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user