mirror of https://github.com/tc39/test262.git
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 desc = {
|
||||
value: 0,
|
||||
value: 0n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -27,7 +27,7 @@ features: [BigInt, Reflect, TypedArray]
|
|||
---*/
|
||||
|
||||
var desc = {
|
||||
value: 0,
|
||||
value: 0n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -25,7 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "2", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "3", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "-1", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "-0", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -21,7 +21,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0.1", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0.000001", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
@ -58,7 +58,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "1.1", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
@ -75,7 +75,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "Infinity", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
@ -99,7 +99,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "-Infinity", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
|
|
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
|
|
|
@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0", {
|
||||
value: 42,
|
||||
value: 42n,
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
writable: false
|
||||
|
|
|
@ -35,6 +35,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
$DETACHBUFFER(sample.buffer);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
sample[0] = 0;
|
||||
sample[0] = 0n;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue