mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Fix multiple test bugs and remove incomplete or no longer valid tests (#1616)
This commit is contained in:
parent
2ef4b205b4
commit
06c2f01901
@ -1,16 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/class/fields-initializer-
|
||||
name: early error -- static ClassElementName Initializer
|
||||
negative:
|
||||
type: SyntaxError
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static /*{ propname }*/ = 0;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-literal-name-
|
||||
name: early error -- PropName of IdentifierName is forbidden value
|
||||
negative:
|
||||
type: SyntaxError
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static /*{ propname }*/;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/class/fields-initializer-
|
||||
name: early error -- static ClassElementName Initializer
|
||||
negative:
|
||||
type: SyntaxError
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static /*{ propname }*/ = 0;
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-literal-name-
|
||||
name: early error -- PropName of IdentifierName is forbidden
|
||||
negative:
|
||||
type: SyntaxError
|
||||
phase: parse
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static /*{ propname }*/;
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: static private class fields forbidden
|
||||
features: [class, class-fields-private]
|
||||
template: propname-error-static
|
||||
---*/
|
||||
|
||||
//- propname
|
||||
#field
|
@ -1,11 +0,0 @@
|
||||
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: static public class fields forbidden
|
||||
features: [class, class-fields-public]
|
||||
template: propname-error-static
|
||||
---*/
|
||||
|
||||
//- propname
|
||||
field
|
@ -13,7 +13,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
const view = new TA(sab, 32, 20);
|
||||
const control = new TA(ab, 0, 2);
|
||||
view[8] = 0n;
|
||||
assert.sameValue(Atomics.add(view, 8, 10n), 0, 'Atomics.add(view, 8, 10n) returns 0');
|
||||
assert.sameValue(Atomics.add(view, 8, 10n), 0n, 'Atomics.add(view, 8, 10n) returns 0');
|
||||
assert.sameValue(view[8], 10n, 'The value of view[8] is 10n');
|
||||
assert.sameValue(Atomics.add(view, 8, -5n), 10n, 'Atomics.add(view, 8, -5n) returns 10n');
|
||||
assert.sameValue(view[8], 5n, 'The value of view[8] is 5n');
|
||||
@ -46,8 +46,8 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
|
||||
testWithAtomicsInBoundsIndices(function(IdxGen) {
|
||||
let Idx = IdxGen(view);
|
||||
view.fill(0);
|
||||
view.fill(0n);
|
||||
Atomics.store(view, Idx, 37n);
|
||||
assert.sameValue(Atomics.add(view, Idx, 0), 37n, 'Atomics.add(view, Idx, 0) returns 37n');
|
||||
assert.sameValue(Atomics.add(view, Idx, 0n), 37n, 'Atomics.add(view, Idx, 0) returns 37n');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,74 +0,0 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-atomics.islockfree
|
||||
description: >
|
||||
Test isLockFree on various non-intuitive arguments
|
||||
features: [arrow-function, Atomics, SharedArrayBuffer, ArrayBuffer, DataView, BigInt, let, TypedArray, for-of]
|
||||
includes: [testAtomics.js, testBigIntTypedArray.js]
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree(hide(3, Number.NaN)),
|
||||
false,
|
||||
'Atomics.isLockFree(hide(3, Number.NaN)) returns false'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree(hide(3, -1)),
|
||||
false,
|
||||
'Atomics.isLockFree(hide(3, -1)) returns false'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree(hide(3, 3.14)),
|
||||
false,
|
||||
'Atomics.isLockFree(hide(3, 3.14)) returns false'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree(hide(3, 0)),
|
||||
false,
|
||||
'Atomics.isLockFree(hide(3, 0)) returns false'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree('1'),
|
||||
Atomics.isLockFree(1),
|
||||
'Atomics.isLockFree("1") returns Atomics.isLockFree(1)'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree('3'),
|
||||
Atomics.isLockFree(3),
|
||||
'Atomics.isLockFree("3") returns Atomics.isLockFree(3)'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.isLockFree(true),
|
||||
Atomics.isLockFree(1),
|
||||
'Atomics.isLockFree(true) returns Atomics.isLockFree(1)'
|
||||
);
|
||||
|
||||
assert.sameValue(Atomics.isLockFree(1), Atomics.isLockFree({
|
||||
valueOf: () => 1
|
||||
}), 'Atomics.isLockFree(1) returns Atomics.isLockFree({\n valueOf: () => 1\n})');
|
||||
|
||||
assert.sameValue(Atomics.isLockFree(3), Atomics.isLockFree({
|
||||
valueOf: () => 3
|
||||
}), 'Atomics.isLockFree(3) returns Atomics.isLockFree({\n valueOf: () => 3\n})');
|
||||
|
||||
assert.sameValue(Atomics.isLockFree(1), Atomics.isLockFree({
|
||||
toString: () => '1'
|
||||
}), 'Atomics.isLockFree(1) returns Atomics.isLockFree({\n toString: () => "1"\n})');
|
||||
|
||||
assert.sameValue(Atomics.isLockFree(3), Atomics.isLockFree({
|
||||
toString: () => '3'
|
||||
}), 'Atomics.isLockFree(3) returns Atomics.isLockFree({\n toString: () => "3"\n})');
|
||||
|
||||
function hide(k, x) {
|
||||
if (k) {
|
||||
return BigInt(hide(k - 3, x) + x);
|
||||
}
|
||||
|
||||
return 0n;
|
||||
}
|
@ -60,7 +60,7 @@ var isLockFree8;
|
||||
};
|
||||
|
||||
{
|
||||
let isLockFree8 = Atomics.isLockFree(8);
|
||||
isLockFree8 = Atomics.isLockFree(8);
|
||||
//
|
||||
// If n equals 8, return AR.[[IsLockFree8]].
|
||||
//
|
||||
|
@ -17,7 +17,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
|
||||
for (let val of [10n, -5n, 12345n, 123456789n, BigInt('33'), {
|
||||
valueOf: () => 33n
|
||||
}, BigInt(undefined)]) {
|
||||
}]) {
|
||||
assert.sameValue(
|
||||
Atomics.store(view, 3, val),
|
||||
BigInt(val),
|
||||
|
@ -20,7 +20,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(Atomics.sub(view, 8, 10n), 100n, 'Atomics.sub(view, 8, 10n) returns 100n');
|
||||
assert.sameValue(view[8], 90n, 'The value of view[8] is 90n');
|
||||
assert.sameValue(Atomics.sub(view, 8, -5n), 90n, 'Atomics.sub(view, 8, -5n) returns 90n');
|
||||
assert.sameValue(view[8], 95, 'The value of view[8] is 95');
|
||||
assert.sameValue(view[8], 95n, 'The value of view[8] is 95');
|
||||
view[3] = -5n;
|
||||
control[0] = -5n;
|
||||
|
||||
@ -54,4 +54,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
Atomics.store(view, Idx, 37n);
|
||||
assert.sameValue(Atomics.sub(view, Idx, 0n), 37n, 'Atomics.sub(view, Idx, 0n) returns 37n');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab, id) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0, -5)); // -5 => 0
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0n, -5)); // -5 => 0
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
|
@ -21,7 +21,7 @@ $262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab, id) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
const before = $262.agent.monotonicNow();
|
||||
const unpark = Atomics.wait(i64a, 0, 0, ${TIMEOUT});
|
||||
const unpark = Atomics.wait(i64a, 0, 0n, ${TIMEOUT});
|
||||
$262.agent.report($262.agent.monotonicNow() - before);
|
||||
$262.agent.report(unpark);
|
||||
$262.agent.leaving();
|
||||
|
@ -28,7 +28,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.add(i64a, 0, 1);
|
||||
Atomics.add(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.and(i64a, 0, 1);
|
||||
Atomics.and(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.compareExchange(i64a, 0, 0, 1);
|
||||
Atomics.compareExchange(i64a, 0, 0n, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.exchange(i64a, 0, 1);
|
||||
Atomics.exchange(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.or(i64a, 0, 1);
|
||||
Atomics.or(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.store(i64a, 0, 0x111111);
|
||||
Atomics.store(i64a, 0, 0x111111n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.sub(i64a, 0, 1);
|
||||
Atomics.sub(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.xor(i64a, 0, 1);
|
||||
Atomics.xor(i64a, 0, 1n);
|
||||
|
||||
const lapse = $262.agent.getReport();
|
||||
assert(
|
||||
|
@ -26,7 +26,7 @@ features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
||||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
const poisoned = {
|
||||
valueOf: function() {
|
||||
|
@ -30,8 +30,8 @@ assert.throws(RangeError, function() {
|
||||
Atomics.wait(i64a, Infinity, poisoned, poisoned);
|
||||
}, '`Atomics.wait(i64a, Infinity, poisoned, poisoned)` throws RangeError');
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.wait(i64a, 2, poisoned, poisoned);
|
||||
}, '`Atomics.wait(i64a, 2, poisoned, poisoned)` throws RangeError');
|
||||
Atomics.wait(i64a, 8, poisoned, poisoned);
|
||||
}, '`Atomics.wait(i64a, 8, poisoned, poisoned)` throws RangeError');
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.wait(i64a, 200, poisoned, poisoned);
|
||||
}, '`Atomics.wait(i64a, 200, poisoned, poisoned)` throws RangeError');
|
||||
|
@ -18,14 +18,14 @@ includes: [atomicsHelper.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const value = 42n;
|
||||
const value = "42n";
|
||||
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
Atomics.add(i64a, 1, 1);
|
||||
Atomics.add(i64a, 1, 1n);
|
||||
$262.agent.report(Atomics.store(i64a, 0, ${value}));
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0));
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0n));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
@ -35,7 +35,7 @@ const i64a = new BigInt64Array(
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.waitUntil(i64a, 1, 1);
|
||||
$262.agent.waitUntil(i64a, 1, 1n);
|
||||
|
||||
assert.sameValue(
|
||||
$262.agent.getReport(),
|
||||
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
||||
const i64a = new BigInt64Array(sab);
|
||||
|
||||
// Wait on index 0
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0, Infinity));
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0n, Infinity));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
@ -37,7 +37,7 @@ $262.agent.start(`
|
||||
const i64a = new BigInt64Array(sab);
|
||||
|
||||
// Wait on index 7
|
||||
$262.agent.report(Atomics.wait(i64a, 7, 0, Infinity));
|
||||
$262.agent.report(Atomics.wait(i64a, 7, 0n, Infinity));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, TypedArray]
|
||||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
||||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
const poisoned = {
|
||||
valueOf: function() {
|
||||
|
@ -20,8 +20,8 @@ for (var i = 0; i < NUMAGENT; i++) {
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
Atomics.add(i64a, ${RUNNING}, 1);
|
||||
$262.agent.report("A " + Atomics.wait(i64a, ${WAIT_INDEX}, 0));
|
||||
Atomics.add(i64a, ${RUNNING}, 1n);
|
||||
$262.agent.report("A " + Atomics.wait(i64a, ${WAIT_INDEX}, 0n));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
@ -30,9 +30,9 @@ for (var i = 0; i < NUMAGENT; i++) {
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
Atomics.add(i64a, ${RUNNING}, 1);
|
||||
Atomics.add(i64a, ${RUNNING}, 1n);
|
||||
// This will always time out.
|
||||
$262.agent.report("B " + Atomics.wait(i64a, ${WAIT_FAKE}, 0, 10));
|
||||
$262.agent.report("B " + Atomics.wait(i64a, ${WAIT_FAKE}, 0n, 10));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
@ -43,7 +43,7 @@ const i64a = new BigInt64Array(
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
||||
// Wait for agents to be running.
|
||||
$262.agent.waitUntil(i64a, RUNNING, BUFFER_SIZE);
|
||||
$262.agent.waitUntil(i64a, RUNNING, BigInt(BUFFER_SIZE));
|
||||
|
||||
// Then wait some more to give the agents a fair chance to wait. If we don't,
|
||||
// we risk sending the wakeup before agents are sleeping, and we hang.
|
||||
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, TypedArray]
|
||||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Atomics.xor(view, 8, 0xF0F0F0F0),
|
||||
Atomics.xor(view, 8, 0xF0F0F0F0n),
|
||||
control[0],
|
||||
'Atomics.xor(view, 8, 0xF0F0F0F0) returns the value of `control[0]` (0x66666666n)'
|
||||
);
|
||||
@ -99,4 +99,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
Atomics.store(view, Idx, 37n);
|
||||
assert.sameValue(Atomics.xor(view, Idx, 0n), 37n, 'Atomics.xor(view, Idx, 0n) returns 37n');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -56,12 +56,6 @@ var testData = [
|
||||
{
|
||||
tag: "heb-x-private",
|
||||
},
|
||||
{
|
||||
tag: "und-ita",
|
||||
// canonical: "und" or "ita" ?
|
||||
maximized: "en-Latn-US",
|
||||
minimized: "und",
|
||||
},
|
||||
{
|
||||
tag: "de-u-kf",
|
||||
maximized: "de-Latn-DE-u-kf",
|
||||
|
@ -47,7 +47,7 @@ for (const [language, expected] of validLanguageOptions) {
|
||||
expect = (expected || 'en') + '-US';
|
||||
assert.sameValue(
|
||||
new Intl.Locale('en-US', options).toString(),
|
||||
expected,
|
||||
expect,
|
||||
`new Intl.Locale('en-US', options).toString() equals the value of ${expect}`
|
||||
);
|
||||
|
||||
|
@ -34,7 +34,7 @@ const validScriptOptions = [
|
||||
[null, 'Null'],
|
||||
['bali', 'Bali'],
|
||||
['Bali', 'Bali'],
|
||||
['bALI', 'BALI'], // TODO REVIEW: is this the correct case regularization?
|
||||
['bALI', 'Bali'],
|
||||
[{ toString() { return 'Brai' } }, 'Brai'],
|
||||
];
|
||||
for (const [script, expected] of validScriptOptions) {
|
||||
|
@ -1,18 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-expr-static-field-initializer.template
|
||||
/*---
|
||||
description: static private class fields forbidden (early error -- static ClassElementName Initializer)
|
||||
features: [class, class-fields-private]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static #field = 0;
|
||||
};
|
@ -1,18 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-public-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-expr-static-field-initializer.template
|
||||
/*---
|
||||
description: static public class fields forbidden (early error -- static ClassElementName Initializer)
|
||||
features: [class, class-fields-public]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static field = 0;
|
||||
};
|
@ -1,19 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-expr-static-literal-name.template
|
||||
/*---
|
||||
description: static private class fields forbidden (early error -- PropName of IdentifierName is forbidden)
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
features: [class, class-fields-private]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static #field;
|
||||
};
|
@ -1,19 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-public-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-expr-static-literal-name.template
|
||||
/*---
|
||||
description: static public class fields forbidden (early error -- PropName of IdentifierName is forbidden)
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
features: [class, class-fields-public]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static field;
|
||||
};
|
@ -12,7 +12,8 @@ info: |
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
[...]
|
||||
includes: [fnGlobalObject.js]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import {} from './eval-rqstd-once_FIXTURE.js';
|
||||
|
@ -15,7 +15,8 @@ info: |
|
||||
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
|
||||
[...]
|
||||
includes: [fnGlobalObject.js]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
assert.sameValue(fnGlobalObject().test262, '123456789');
|
||||
|
@ -21,7 +21,8 @@ info: |
|
||||
c. Set index to ? InnerModuleEvaluation(requiredModule, stack, index).
|
||||
[...]
|
||||
includes: [fnGlobalObject.js]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import {} from './eval-self-once.js';
|
||||
|
@ -20,7 +20,8 @@ info: |
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Set index to ? InnerModuleInstantiation(requiredModule, stack, index).
|
||||
[...]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import {} from './instn-once.js';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: >
|
||||
Default exports are not included in an imported module namespace object when module exported with `* as namespace`
|
||||
Default exports are included in an imported module namespace object when module exported with `* as namespace`
|
||||
esid: sec-moduledeclarationinstantiation
|
||||
info: |
|
||||
[...]
|
||||
@ -40,18 +40,19 @@ info: |
|
||||
c. For each element n of starNames, do
|
||||
i. If SameValue(n, "default") is false, then
|
||||
[...]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import named from './instn-star-props-dflt-skip-star-as-named_FIXTURE.js';
|
||||
import production from './instn-star-props-dflt-skip-star-as-prod_FIXTURE.js';
|
||||
import {named} from './instn-star-props-dflt-skip-star-as-named_FIXTURE.js';
|
||||
import {production} from './instn-star-props-dflt-skip-star-as-prod_FIXTURE.js';
|
||||
|
||||
assert('namedOther' in named);
|
||||
assert.sameValue(
|
||||
'default' in named, false, 'default specified via identifier'
|
||||
'default' in named, true, 'default specified via identifier'
|
||||
);
|
||||
|
||||
assert('productionOther' in production);
|
||||
assert.sameValue(
|
||||
'default' in production, false, 'default specified via dedicated production'
|
||||
'default' in production, true, 'default specified via dedicated production'
|
||||
);
|
||||
|
@ -24,7 +24,8 @@ info: |
|
||||
iii. If resolution is not "ambiguous", append name to
|
||||
unambiguousNames.
|
||||
d. Let namespace be ModuleNamespaceCreate(module, unambiguousNames).
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import * as ns from './instn-star-props-nrml-1_FIXTURE.js';
|
||||
|
@ -2,7 +2,7 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: >
|
||||
Default exports are not included in an imported module namespace object when a namespace object is created.
|
||||
Default exports are included in an imported module namespace object when a namespace object is created.
|
||||
esid: sec-module-namespace-exotic-objects-get-p-receiver
|
||||
info: |
|
||||
[...]
|
||||
@ -25,7 +25,8 @@ info: |
|
||||
unambiguousNames.
|
||||
d. Let namespace be ModuleNamespaceCreate(module, unambiguousNames).
|
||||
[...]
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import * as namedns1 from './get-nested-namespace-dflt-skip-named_FIXTURE.js';
|
||||
@ -33,10 +34,10 @@ import * as productionns1 from './get-nested-namespace-dflt-skip-prod_FIXTURE.js
|
||||
|
||||
assert('namedOther' in namedns1.namedns2);
|
||||
assert.sameValue(
|
||||
'default' in namedns1.namedns2, false, 'default specified via identifier'
|
||||
'default' in namedns1.namedns2, true, 'default specified via identifier'
|
||||
);
|
||||
|
||||
assert('productionOther' in productionns1.productionns2);
|
||||
assert.sameValue(
|
||||
'default' in productionns1.productionns2, false, 'default specified via dedicated production'
|
||||
'default' in productionns1.productionns2, true, 'default specified via dedicated production'
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ function notExportedFunc() {}
|
||||
function* notExportedGen() {}
|
||||
class notExportedClass {}
|
||||
|
||||
var starBindingId;
|
||||
var starAsBindingId;
|
||||
|
||||
export var starAsVarDecl;
|
||||
export let starAsLetDecl;
|
||||
|
@ -2,4 +2,4 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
export var indirectIdName;
|
||||
export var starIndirectIdName;
|
||||
export var starAsIndirectIdName;
|
||||
|
@ -24,7 +24,8 @@ info: |
|
||||
iii. If resolution is not "ambiguous", append name to
|
||||
unambiguousNames.
|
||||
d. Let namespace be ModuleNamespaceCreate(module, unambiguousNames).
|
||||
flags: [module, export-star-as-namespace-from-module]
|
||||
flags: [module]
|
||||
features: [export-star-as-namespace-from-module]
|
||||
---*/
|
||||
|
||||
import * as ns from './get-nested-namespace-props-nrml-1_FIXTURE.js';
|
||||
@ -37,7 +38,7 @@ assert('starAsFuncDecl' in ns.exportns, 'starAsFuncDecl');
|
||||
assert('starAsGenDecl' in ns.exportns, 'starAsGenDecl');
|
||||
assert('starAsClassDecl' in ns.exportns, 'starAsClassDecl');
|
||||
assert('starAsBindingId' in ns.exportns, 'starAsBindingId');
|
||||
assert('starAsIdName' in ns.exportns, 'starAsIdName');
|
||||
assert('starIdName' in ns.exportns, 'starIdName');
|
||||
assert('starAsIndirectIdName' in ns.exportns, 'starAsIndirectIdName');
|
||||
assert('starAsIndirectIdName2' in ns.exportns, 'starAsIndirectIdName2');
|
||||
assert('namespaceBinding' in ns.exportns, 'namespaceBinding');
|
||||
|
@ -1,18 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-decl-static-field-initializer.template
|
||||
/*---
|
||||
description: static private class fields forbidden (early error -- static ClassElementName Initializer)
|
||||
features: [class, class-fields-private]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static #field = 0;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-public-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-decl-static-field-initializer.template
|
||||
/*---
|
||||
description: static public class fields forbidden (early error -- static ClassElementName Initializer)
|
||||
features: [class, class-fields-public]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static field = 0;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-decl-static-literal-name.template
|
||||
/*---
|
||||
description: static private class fields forbidden (early error -- PropName of IdentifierName is forbidden value)
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
features: [class, class-fields-private]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static #field;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-public-fields-forbidden.case
|
||||
// - src/class-fields/propname-error-static/cls-decl-static-literal-name.template
|
||||
/*---
|
||||
description: static public class fields forbidden (early error -- PropName of IdentifierName is forbidden value)
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
features: [class, class-fields-public]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static field;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user