mirror of https://github.com/tc39/test262.git
Add `Array.prototype.includes` and `exponentiation` features (#3799)
This commit is contained in:
parent
9704d7f22f
commit
4a6439e4a7
|
@ -380,6 +380,7 @@ includes: [asyncHelpers.js]
|
|||
asyncTest(async function() {
|
||||
await assert.throwsAsync(TypeError, () => Array.fromAsync([], "not a function"), "Array.fromAsync should reject asynchronously");
|
||||
});
|
||||
```
|
||||
|
||||
## A Note on Python-based tools
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ ArrayBuffer
|
|||
Array.prototype.at
|
||||
Array.prototype.flat
|
||||
Array.prototype.flatMap
|
||||
Array.prototype.includes
|
||||
Array.prototype.values
|
||||
arrow-function
|
||||
async-iteration
|
||||
|
@ -148,6 +149,7 @@ destructuring-assignment
|
|||
destructuring-binding
|
||||
dynamic-import
|
||||
error-cause
|
||||
exponentiation
|
||||
export-star-as-namespace-from-module # https://github.com/tc39/ecma262/pull/1174
|
||||
FinalizationRegistry
|
||||
for-in-order
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
UpdateExpression ** ExponentiationExpression
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
template: invalid
|
||||
features: [exponentiation]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
UpdateExpression ** ExponentiationExpression
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
template: invalid
|
||||
features: [exponentiation]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
UpdateExpression ** ExponentiationExpression
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
template: invalid
|
||||
features: [exponentiation]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/*---
|
||||
template: default
|
||||
desc: Compound exponentiation assignment with target being a private reference
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
//- lhs
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*---
|
||||
desc: Computed property name from exponentiation expression
|
||||
template: evaluation
|
||||
features: [computed-property-names]
|
||||
features: [computed-property-names, exponentiation]
|
||||
---*/
|
||||
|
||||
//- ComputedPropertyName
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*---
|
||||
desc: Computed property name from math
|
||||
template: evaluation
|
||||
features: [computed-property-names]
|
||||
features: [computed-property-names, exponentiation]
|
||||
---*/
|
||||
//- ComputedPropertyName
|
||||
1 + 2 - 3 * 4 / 5 ** 6
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/*---
|
||||
esid: sec-array.prototype.includes
|
||||
description: Array.prototype.includes applied to boolean primitive
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Array.prototype.includes.call(true), false, 'Array.prototype.includes.call(true) must return false');
|
||||
|
|
|
@ -16,6 +16,7 @@ info: |
|
|||
7. Repeat, while k < len
|
||||
...
|
||||
8. Return false.
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var sample = [7, 7, 7, 7];
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
7. Repeat, while k < len
|
||||
...
|
||||
8. Return false.
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var sample = [42, 43, 43, 41];
|
||||
|
|
|
@ -13,6 +13,7 @@ info: |
|
|||
...
|
||||
7. Repeat, while k < len
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var sample = [42, 43];
|
||||
|
|
|
@ -12,7 +12,7 @@ info: |
|
|||
a. Let elementK be the result of ? Get(O, ! ToString(k)).
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [Proxy]
|
||||
features: [Proxy, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var calls;
|
||||
|
|
|
@ -17,6 +17,7 @@ info: |
|
|||
2. If len ≤ +0, return +0.
|
||||
3. If len is +∞, return 2**53-1.
|
||||
4. Return min(len, 2**53-1).
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj = {
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
2. Let len be ? ToLength(? Get(O, "length")).
|
||||
3. If len is 0, return false.
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var calls = 0;
|
||||
|
|
|
@ -20,6 +20,7 @@ info: |
|
|||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Array.prototype.includes.length, 1);
|
||||
|
|
|
@ -17,6 +17,7 @@ info: |
|
|||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Array.prototype.includes.name, "includes");
|
||||
|
|
|
@ -13,6 +13,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue([0].includes(), false, "[0].includes()");
|
||||
|
|
|
@ -18,7 +18,7 @@ info: |
|
|||
7. If IsConstructor(constructor) is false, throw a TypeError exception.
|
||||
...
|
||||
includes: [isConstructor.js]
|
||||
features: [Reflect.construct, arrow-function]
|
||||
features: [Reflect.construct, arrow-function, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
and in Annex B.2 has the attributes { [[Writable]]: true,
|
||||
[[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Array.prototype, "includes");
|
||||
|
|
|
@ -10,6 +10,7 @@ info: |
|
|||
...
|
||||
2. Let len be ? ToLength(? Get(O, "length")).
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj = {};
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
7. Repeat, while k < len
|
||||
a. Let elementK be the result of ? Get(O, ! ToString(k)).
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var stopped = 0;
|
||||
|
|
|
@ -11,7 +11,7 @@ info: |
|
|||
4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step
|
||||
produces the value 0.)
|
||||
...
|
||||
features: [Symbol]
|
||||
features: [Symbol, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var fromIndex = Symbol("1");
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step
|
||||
produces the value 0.)
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var fromIndex = {
|
||||
|
|
|
@ -10,7 +10,7 @@ info: |
|
|||
...
|
||||
2. Let len be ? ToLength(? Get(O, "length")).
|
||||
...
|
||||
features: [Symbol]
|
||||
features: [Symbol, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj = {
|
||||
|
|
|
@ -10,6 +10,7 @@ info: |
|
|||
...
|
||||
2. Let len be ? ToLength(? Get(O, "length")).
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj1 = {
|
||||
|
|
|
@ -13,6 +13,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var sample = [42, 0, 1, NaN];
|
||||
|
|
|
@ -18,7 +18,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
...
|
||||
features: [Symbol]
|
||||
features: [Symbol, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var symbol = Symbol("1");
|
||||
|
|
|
@ -18,7 +18,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
8. Return false.
|
||||
features: [Symbol]
|
||||
features: [Symbol, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue([42].includes(43), false, "43");
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
|
||||
1. Let O be ? ToObject(this value).
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var includes = Array.prototype.includes;
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
8. Return false.
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj = {
|
||||
|
|
|
@ -17,6 +17,7 @@ info: |
|
|||
2. If len ≤ +0, return +0.
|
||||
3. If len is +∞, return 253-1.
|
||||
4. Return min(len, 253-1).
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var obj = {
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
b. If SameValueZero(searchElement, elementK) is true, return true.
|
||||
c. Increase k by 1.
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var sample = ["a", "b", "c"];
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
7. Repeat, while k < len
|
||||
a. Let elementK be the result of ? Get(O, ! ToString(k)).
|
||||
...
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
function getCleanObj() {
|
||||
|
|
|
@ -15,7 +15,7 @@ info: |
|
|||
|
||||
Argument Type: Undefined
|
||||
Result: Throw a TypeError exception.
|
||||
features: [Symbol, Symbol.isConcatSpreadable, Symbol.iterator, Symbol.species, Array.prototype.flat, Array.prototype.flatMap]
|
||||
features: [Symbol, Symbol.isConcatSpreadable, Symbol.iterator, Symbol.species, Array.prototype.flat, Array.prototype.flatMap, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
["constructor", "length", "0", Symbol.isConcatSpreadable, Symbol.species].forEach(function(key) {
|
||||
|
|
|
@ -14,6 +14,7 @@ info: |
|
|||
...
|
||||
e. Perform ? Set(O, "length", newLen, true).
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -15,7 +15,8 @@ info: |
|
|||
c. Let element be ? Get(O, index).
|
||||
d. Perform ? DeletePropertyOrThrow(O, index).
|
||||
e. Perform ? Set(O, "length", newLen, true).
|
||||
f. Return element.
|
||||
f. Return element.
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -14,6 +14,7 @@ info: |
|
|||
...
|
||||
7. Perform ? Set(O, "length", len, true).
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -15,6 +15,7 @@ info: |
|
|||
...
|
||||
7. Perform ? Set(O, "length", len, true).
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -13,6 +13,7 @@ info: |
|
|||
4. Let argCount be the number of elements in items.
|
||||
5. If len + argCount > 2^53-1, throw a TypeError exception.
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
...
|
||||
2. Let len be ? ToLength(? Get(O, "length")).
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
function StopReverse() {}
|
||||
|
|
|
@ -6,6 +6,7 @@ esid: sec-array.prototype.reverse
|
|||
description: >
|
||||
Ensure correct MOP operations are called when length exceeds 2^53-1.
|
||||
includes: [compareArray.js, proxyTrapsHelper.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
function StopReverse() {}
|
||||
|
|
|
@ -17,6 +17,7 @@ info: |
|
|||
else let final be min(relativeEnd, len).
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var array = [];
|
||||
|
|
|
@ -16,6 +16,7 @@ info: |
|
|||
else let final be min(relativeEnd, len).
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -15,6 +15,7 @@ info: |
|
|||
...
|
||||
19. Perform ? Set(O, "length", len - actualDeleteCount + itemCount, true).
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -20,7 +20,7 @@ info: |
|
|||
12. Perform ? Set(A, "length", actualDeleteCount, true).
|
||||
...
|
||||
includes: [compareArray.js, proxyTrapsHelper.js]
|
||||
features: [Symbol.species]
|
||||
features: [Symbol.species, exponentiation]
|
||||
---*/
|
||||
|
||||
function StopSplice() {}
|
||||
|
|
|
@ -23,6 +23,7 @@ info: |
|
|||
d. Increment k by 1.
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -25,6 +25,7 @@ info: |
|
|||
ii. Decrease k by 1.
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -21,6 +21,7 @@ info: |
|
|||
vi. Decrease k by 1.
|
||||
...
|
||||
includes: [compareArray.js]
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {
|
||||
|
|
|
@ -15,6 +15,7 @@ info: |
|
|||
c. Let actualDeleteCount be min(max(dc, 0), len - actualStart).
|
||||
8. If len+insertCount-actualDeleteCount > 2^53-1, throw a TypeError exception.
|
||||
...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -16,7 +16,7 @@ info: |
|
|||
ArrayCreate ( length [, proto ] )
|
||||
|
||||
1. If length > 2 ** 32 - 1, throw a RangeError exception.
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
// Object with large "length" property
|
||||
|
|
|
@ -17,7 +17,7 @@ info: |
|
|||
ArrayCreate ( length [, proto ] )
|
||||
|
||||
1. If length > 2 ** 32 - 1, throw a RangeError exception.
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
// Object with large "length" property
|
||||
|
|
|
@ -15,7 +15,7 @@ info: |
|
|||
1. Let len be ? ToIntegerOrInfinity(argument).
|
||||
2. If len ≤ 0, return +0𝔽.
|
||||
3. Return 𝔽(min(len, 2^53 - 1))
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
includes: [compareArray.js]
|
||||
---*/
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ info: |
|
|||
ArrayCreate ( length [, proto ] )
|
||||
|
||||
1. If length > 2 ** 32 - 1, throw a RangeError exception.
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
// Object with large "length" property
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
3. Let argCount be the number of actual arguments.
|
||||
4. If argCount > 0, then ...
|
||||
5. Perform ? Set(O, "length", len+argCount, true).
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -21,6 +21,7 @@ info: |
|
|||
v. Else fromPresent is false,
|
||||
1. Perform ? DeletePropertyOrThrow(O, to).
|
||||
vi. Decrease k by 1.
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
function StopUnshift() {}
|
||||
|
|
|
@ -12,6 +12,7 @@ info: |
|
|||
4. If argCount > 0, then
|
||||
a. If len+argCount > 2^53-1, throw a TypeError exception.
|
||||
b. ...
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var arrayLike = {};
|
||||
|
|
|
@ -15,7 +15,7 @@ info: |
|
|||
5. Else, let actualIndex be len + relativeIndex.
|
||||
6. If actualIndex >= len or actualIndex < 0, throw a *RangeError* exception.
|
||||
...
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
|
|
|
@ -15,7 +15,7 @@ info: |
|
|||
5. Else, let actualIndex be len + relativeIndex.
|
||||
6. If actualIndex >= len or actualIndex < 0, throw a *RangeError* exception.
|
||||
...
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
[0, 1, 2].with(-3, 7);
|
||||
|
|
|
@ -17,7 +17,7 @@ info: |
|
|||
ArrayCreate ( length [, proto ] )
|
||||
|
||||
1. If length > 2 ** 32 - 1, throw a RangeError exception.
|
||||
features: [change-array-by-copy]
|
||||
features: [change-array-by-copy, exponentiation]
|
||||
---*/
|
||||
|
||||
// Object with large "length" property
|
||||
|
|
|
@ -12,7 +12,7 @@ description: >
|
|||
If n equals 4, return true.
|
||||
If n equals 8, return AR.[[IsLockFree8]].
|
||||
Return false.
|
||||
features: [Atomics]
|
||||
features: [Atomics, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
// These are the only counts that we care about tracking.
|
||||
|
|
|
@ -17,7 +17,7 @@ info: |
|
|||
set
|
||||
|
||||
includes: [nativeFunctionMatcher.js, wellKnownIntrinsicObjects.js]
|
||||
features: [arrow-function, Reflect]
|
||||
features: [arrow-function, Reflect, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const visited = [];
|
||||
|
|
|
@ -11,7 +11,7 @@ info: |
|
|||
Append p as the last element of entries.
|
||||
...
|
||||
|
||||
features: [BigInt, Symbol, TypedArray, WeakRef]
|
||||
features: [BigInt, Symbol, TypedArray, WeakRef, exponentiation]
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*---
|
||||
description: BigInt to Number conversion
|
||||
esid: pending
|
||||
features: [BigInt]
|
||||
features: [BigInt, exponentiation]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number(0n), 0);
|
||||
|
|
|
@ -14,7 +14,7 @@ info: |
|
|||
6. Let trap be ? GetMethod(handler, "has").
|
||||
7. If trap is undefined, then
|
||||
a. Return ? target.[[HasProperty]](P).
|
||||
features: [Proxy, Symbol, Reflect]
|
||||
features: [Proxy, Symbol, Reflect, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
var stringTarget = new Proxy(new String("str"), {});
|
||||
|
|
|
@ -23,6 +23,7 @@ info: |
|
|||
i. If _global_ is *true* or _sticky_ is *true*, then
|
||||
1. Perform ? Set(_R_, *"lastIndex"*, *+0*<sub>𝔽</sub>, *true*).
|
||||
ii. Return *null*.
|
||||
features: [exponentiation]
|
||||
---*/
|
||||
|
||||
var R_g = /./g, R_y = /./y, R_gy = /./gy;
|
||||
|
|
|
@ -14,7 +14,7 @@ info: |
|
|||
Append value as the last element of entries.
|
||||
...
|
||||
|
||||
features: [BigInt, Symbol, TypedArray, WeakRef]
|
||||
features: [BigInt, Symbol, TypedArray, WeakRef, exponentiation]
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ info: |
|
|||
|
||||
The host may use this hook to add properties to the ShadowRealm's global
|
||||
object. Those properties must be configurable.
|
||||
features: [ShadowRealm]
|
||||
features: [ShadowRealm, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.timezone.prototype.getpossibleinstantsfor
|
||||
description: >
|
||||
Call getPossibleInstantsFor with values near the date/time limit and a fixed offset.
|
||||
features: [Temporal]
|
||||
features: [Temporal, exponentiation]
|
||||
---*/
|
||||
|
||||
const oneHour = 1n * 60n * 60n * 1000n**3n;
|
||||
|
|
|
@ -7,6 +7,7 @@ description: >
|
|||
Tests that the options numberingSystem and calendar are mapped
|
||||
to lower case properly.
|
||||
author: Caio Lima
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
let defaultLocale = new Intl.DateTimeFormat().resolvedOptions().locale;
|
||||
|
|
|
@ -8,6 +8,7 @@ description: >
|
|||
Checks the output of 'relatedYear' and 'yearName' type, and
|
||||
the choice of pattern based on calendar.
|
||||
locale: [zh-u-ca-chinese]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const df = new Intl.DateTimeFormat("zh-u-ca-chinese", {year: "numeric"});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*---
|
||||
esid: sec-date-time-style-pattern
|
||||
description: Checks basic handling of timeStyle and dateStyle.
|
||||
features: [Intl.DateTimeFormat-datetimestyle]
|
||||
features: [Intl.DateTimeFormat-datetimestyle, Array.prototype.includes]
|
||||
locale: [en-US]
|
||||
---*/
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
/*---
|
||||
description: Tests for existance and behavior of Intl.DateTimeFormat.prototype.formatToParts
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
function reduce(parts) {
|
||||
|
|
|
@ -7,7 +7,7 @@ description: >
|
|||
Intl.DateTimeFormat.prototype.resolvedOptions properly
|
||||
reflect hourCycle settings when using timeStyle.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.DateTimeFormat-datetimestyle]
|
||||
features: [Intl.DateTimeFormat-datetimestyle, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const hcValues = ["h11", "h12", "h23", "h24"];
|
||||
|
|
|
@ -10,6 +10,7 @@ info: |
|
|||
12.4.5 Intl.DateTimeFormat.prototype.resolvedOptions()
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
/* Values passed via unicode extension key work */
|
||||
|
|
|
@ -22,7 +22,7 @@ info: |
|
|||
Intl.DateTimeFormat objects. The list must include "gregory".
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const calendars = Intl.supportedValuesOf("calendar");
|
||||
|
|
|
@ -22,7 +22,7 @@ info: |
|
|||
Intl.DateTimeFormat objects. The list must include "gregory".
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration, Intl.DisplayNames-v2]
|
||||
features: [Intl-enumeration, Intl.DisplayNames-v2, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const calendars = Intl.supportedValuesOf("calendar");
|
||||
|
|
|
@ -21,7 +21,7 @@ info: |
|
|||
calendars for which the implementation provides the functionality of
|
||||
Intl.DateTimeFormat objects. The list must include "gregory".
|
||||
includes: [compareArray.js]
|
||||
features: [Intl-enumeration, Intl.Locale]
|
||||
features: [Intl-enumeration, Intl.Locale, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const calendars = Intl.supportedValuesOf("calendar");
|
||||
|
|
|
@ -23,7 +23,7 @@ info: |
|
|||
Intl.Collator objects.
|
||||
includes: [testIntl.js]
|
||||
locale: [en, ar, de, es, ko, ln, si, sv, zh]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const collations = Intl.supportedValuesOf("collation");
|
||||
|
|
|
@ -22,7 +22,7 @@ info: |
|
|||
collations for which the implementation provides the functionality of
|
||||
Intl.Collator objects.
|
||||
includes: [compareArray.js]
|
||||
features: [Intl-enumeration, Intl.Locale]
|
||||
features: [Intl-enumeration, Intl.Locale, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const collations = Intl.supportedValuesOf("collation");
|
||||
|
|
|
@ -23,7 +23,7 @@ info: |
|
|||
for which the implementation provides the functionality of Intl.DisplayNames
|
||||
and Intl.NumberFormat objects.
|
||||
locale: [en]
|
||||
features: [Intl-enumeration, Intl.DisplayNames]
|
||||
features: [Intl-enumeration, Intl.DisplayNames, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const currencies = Intl.supportedValuesOf("currency");
|
||||
|
|
|
@ -25,7 +25,7 @@ info: |
|
|||
value of every row of Table 4, except the header row.
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const numberingSystems = Intl.supportedValuesOf("numberingSystem");
|
||||
|
|
|
@ -25,7 +25,7 @@ info: |
|
|||
value of every row of Table 4, except the header row.
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const numberingSystems = Intl.supportedValuesOf("numberingSystem");
|
||||
|
|
|
@ -25,7 +25,7 @@ info: |
|
|||
value of every row of Table 4, except the header row.
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration, Intl.RelativeTimeFormat]
|
||||
features: [Intl-enumeration, Intl.RelativeTimeFormat, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const numberingSystems = Intl.supportedValuesOf("numberingSystem");
|
||||
|
|
|
@ -24,7 +24,7 @@ info: |
|
|||
Intl.RelativeTimeFormat objects. The list must include the Numbering System
|
||||
value of every row of Table 4, except the header row.
|
||||
includes: [testIntl.js]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const numberingSystems = Intl.supportedValuesOf("numberingSystem");
|
||||
|
|
|
@ -22,7 +22,7 @@ info: |
|
|||
identifiers listed in every row of Table 1, except the header row.
|
||||
includes: [testIntl.js]
|
||||
locale: [en]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const units = Intl.supportedValuesOf("unit");
|
||||
|
|
|
@ -21,7 +21,7 @@ info: |
|
|||
undefined as comparefn, that contains the unique values of simple unit
|
||||
identifiers listed in every row of Table 1, except the header row.
|
||||
includes: [compareArray.js, testIntl.js]
|
||||
features: [Intl-enumeration]
|
||||
features: [Intl-enumeration, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const units = Intl.supportedValuesOf("unit");
|
||||
|
|
|
@ -14,7 +14,7 @@ info: |
|
|||
Unicode Locale Identifier, section 3.2, sorted in descending preference of
|
||||
those in common use for string comparison in locale. The values "standard"
|
||||
and "search" must be excluded from list.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
features: [Intl.Locale, Intl.Locale-info, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const output = new Intl.Locale('en').collations;
|
||||
|
|
|
@ -13,7 +13,7 @@ info: |
|
|||
be lower case String values indicating either the 12-hour format ("h11",
|
||||
"h12") or the 24-hour format ("h23", "h24"), sorted in descending preference
|
||||
of those in common use for date and time formatting in locale.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
features: [Intl.Locale, Intl.Locale-info, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const output = new Intl.Locale('en').hourCycles;
|
||||
|
|
|
@ -6,6 +6,7 @@ esid: sec-initializenumberformat
|
|||
description: >
|
||||
Tests that the options numberingSystem are mapped to lower case.
|
||||
author: Caio Lima
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
let defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
|
||||
|
|
|
@ -7,6 +7,7 @@ description: >
|
|||
Tests that Intl.PluralRules.prototype.resolvedOptions creates a new array
|
||||
for the pluralCategories property on every call.
|
||||
includes: [propertyHelper.js, compareArray.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const allowedValues = ["zero", "one", "two", "few", "many", "other"];
|
||||
|
|
|
@ -8,7 +8,7 @@ info: |
|
|||
Intl.Segmenter ([ locales [ , options ]])
|
||||
|
||||
3. Let _requestedLocales_ be ? CanonicalizeLocaleList(_locales_).
|
||||
features: [Intl.Segmenter]
|
||||
features: [Intl.Segmenter, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const defaultLocale = new Intl.Segmenter().resolvedOptions().locale;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
esid: sec-temporal.timezone.prototype.getoffsetnanosecondsfor
|
||||
description: >
|
||||
Test offset when nanoseconds are subtracted or added from DST transition.
|
||||
features: [Temporal]
|
||||
features: [Temporal, exponentiation]
|
||||
---*/
|
||||
|
||||
// From <https://github.com/eggert/tz/blob/main/northamerica>:
|
||||
|
|
|
@ -8,6 +8,7 @@ description: >
|
|||
supported locales.
|
||||
author: Norbert Lindenberg
|
||||
includes: [testIntl.js]
|
||||
features: [Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
testWithIntlConstructors(function (Constructor) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// - src/assignment-target-type/invalid/direct.template
|
||||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (Direct assignment)
|
||||
features: [exponentiation]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// - src/assignment-target-type/invalid/direct.template
|
||||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (Direct assignment)
|
||||
features: [exponentiation]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// - src/assignment-target-type/invalid/direct.template
|
||||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (Direct assignment)
|
||||
features: [exponentiation]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (ParenthesizedExpression)
|
||||
esid: sec-grouping-operator-static-semantics-assignmenttargettype
|
||||
features: [exponentiation]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (ParenthesizedExpression)
|
||||
esid: sec-grouping-operator-static-semantics-assignmenttargettype
|
||||
features: [exponentiation]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue