mirror of
https://github.com/tc39/test262.git
synced 2025-06-02 13:10:31 +02:00
Consolidate set methods features
This commit is contained in:
parent
27a7501893
commit
718aa71683
@ -101,6 +101,10 @@ iterator-helpers
|
|||||||
# https://github.com/tc39/proposal-promise-with-resolvers
|
# https://github.com/tc39/proposal-promise-with-resolvers
|
||||||
promise-with-resolvers
|
promise-with-resolvers
|
||||||
|
|
||||||
|
# Set methods
|
||||||
|
# https://github.com/tc39/proposal-set-methods
|
||||||
|
set-methods
|
||||||
|
|
||||||
## Standard language features
|
## Standard language features
|
||||||
#
|
#
|
||||||
# Language features that have been included in a published version of the
|
# Language features that have been included in a published version of the
|
||||||
@ -210,7 +214,6 @@ regexp-named-groups
|
|||||||
regexp-unicode-property-escapes
|
regexp-unicode-property-escapes
|
||||||
rest-parameters
|
rest-parameters
|
||||||
Set
|
Set
|
||||||
Set-methods
|
|
||||||
SharedArrayBuffer
|
SharedArrayBuffer
|
||||||
string-trimming
|
string-trimming
|
||||||
String.fromCodePoint
|
String.fromCodePoint
|
||||||
@ -264,7 +267,3 @@ __setter__
|
|||||||
|
|
||||||
IsHTMLDDA
|
IsHTMLDDA
|
||||||
host-gc-required
|
host-gc-required
|
||||||
|
|
||||||
# Set methods
|
|
||||||
# https://github.com/tc39/proposal-set-methods
|
|
||||||
set-methods
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union should not call Set.prototype.add
|
description: Set.prototype.union should not call Set.prototype.add
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ info: |
|
|||||||
7. Let has be ? Get(obj, "has").
|
7. Let has be ? Get(obj, "has").
|
||||||
...
|
...
|
||||||
9. Let keys be ? Get(obj, "keys").
|
9. Let keys be ? Get(obj, "keys").
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ info: |
|
|||||||
7. Let has be ? Get(obj, "has").
|
7. Let has be ? Get(obj, "has").
|
||||||
...
|
...
|
||||||
9. Let keys be ? Get(obj, "keys").
|
9. Let keys be ? Get(obj, "keys").
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ esid: sec-set.prototype.union
|
|||||||
description: Set.prototype.union appends new values to a copy of the original Set
|
description: Set.prototype.union appends new values to a copy of the original Set
|
||||||
info: |
|
info: |
|
||||||
7.b.iii.1 Append nextValue to resultSetData.
|
7.b.iii.1 Append nextValue to resultSetData.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union doesn't work with arrays
|
description: Set.prototype.union doesn't work with arrays
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const s1 = new Set([1, 2]);
|
const s1 = new Set([1, 2]);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Tests that Set.prototype.union meets the requirements for built-in objects
|
description: Tests that Set.prototype.union meets the requirements for built-in objects
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
|
@ -5,7 +5,7 @@ esid: sec-getsetrecord
|
|||||||
description: GetSetRecord throws if obj is not an object
|
description: GetSetRecord throws if obj is not an object
|
||||||
info: |
|
info: |
|
||||||
1. If obj is not an Object, throw a TypeError exception.
|
1. If obj is not an Object, throw a TypeError exception.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
let s1 = new Set([1]);
|
let s1 = new Set([1]);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union combines with Map
|
description: Set.prototype.union combines with Map
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union can combine empty Sets
|
description: Set.prototype.union can combine empty Sets
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union is successful when called on itself
|
description: Set.prototype.union is successful when called on itself
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union can combine Sets that have the same content
|
description: Set.prototype.union can combine Sets that have the same content
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union combines Sets
|
description: Set.prototype.union combines Sets
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ esid: sec-set.prototype.union
|
|||||||
description: Set.prototype.union converts -0𝔽 to +0𝔽
|
description: Set.prototype.union converts -0𝔽 to +0𝔽
|
||||||
info: |
|
info: |
|
||||||
7.b.ii. If nextValue is -0𝔽, set nextValue to +0𝔽.
|
7.b.ii. If nextValue is -0𝔽, set nextValue to +0𝔽.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ description: GetSetRecord throws an exception if the Set-like object's 'has' pro
|
|||||||
info: |
|
info: |
|
||||||
7. Let has be ? Get(obj, "has").
|
7. Let has be ? Get(obj, "has").
|
||||||
8. If IsCallable(has) is false, throw a TypeError exception.
|
8. If IsCallable(has) is false, throw a TypeError exception.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const s1 = new Set([1, 2]);
|
const s1 = new Set([1, 2]);
|
||||||
|
@ -6,7 +6,7 @@ description: GetSetRecord throws an exception if the Set-like object's 'keys' pr
|
|||||||
info: |
|
info: |
|
||||||
9. Let keys be ? Get(obj, "keys").
|
9. Let keys be ? Get(obj, "keys").
|
||||||
10. If IsCallable(keys) is false, throw a TypeError exception.
|
10. If IsCallable(keys) is false, throw a TypeError exception.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const s1 = new Set([1, 2]);
|
const s1 = new Set([1, 2]);
|
||||||
|
2
test/built-ins/Set/prototype/union/length.js
vendored
2
test/built-ins/Set/prototype/union/length.js
vendored
@ -6,7 +6,7 @@ description: Set.prototype.union length property
|
|||||||
info: |
|
info: |
|
||||||
Set.prototype.union ( other )]
|
Set.prototype.union ( other )]
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
assert.sameValue(typeof Set.prototype.union, "function");
|
assert.sameValue(typeof Set.prototype.union, "function");
|
||||||
|
|
||||||
|
2
test/built-ins/Set/prototype/union/name.js
vendored
2
test/built-ins/Set/prototype/union/name.js
vendored
@ -6,7 +6,7 @@ description: Set.prototype.union name property
|
|||||||
info: |
|
info: |
|
||||||
Set.prototype.union ( other )]
|
Set.prototype.union ( other )]
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
assert.sameValue(typeof Set.prototype.union, "function");
|
assert.sameValue(typeof Set.prototype.union, "function");
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union does not implement [[Construct]], is not new-able
|
description: Set.prototype.union does not implement [[Construct]], is not new-able
|
||||||
includes: [isConstructor.js]
|
includes: [isConstructor.js]
|
||||||
features: [Reflect.construct, Set-methods]
|
features: [Reflect.construct, set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union throws when receiver is not a Set
|
description: Set.prototype.union throws when receiver is not a Set
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
class MySetLike {
|
class MySetLike {
|
||||||
|
@ -5,7 +5,7 @@ esid: sec-set.prototype.union
|
|||||||
description: Set.prototype.union RequireInternalSlot
|
description: Set.prototype.union RequireInternalSlot
|
||||||
info: |
|
info: |
|
||||||
2. Perform ? RequireInternalSlot(O, [[SetData]])
|
2. Perform ? RequireInternalSlot(O, [[SetData]])
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const union = Set.prototype.union;
|
const union = Set.prototype.union;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union consumes a set-like array as a set-like, not an array
|
description: Set.prototype.union consumes a set-like array as a set-like, not an array
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union maintains values even when a custom Set-like class mutates the receiver
|
description: Set.prototype.union maintains values even when a custom Set-like class mutates the receiver
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union calls a Set-like class's methods in order
|
description: Set.prototype.union calls a Set-like class's methods in order
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ info: |
|
|||||||
3. Let numSize be ? ToNumber(rawSize).
|
3. Let numSize be ? ToNumber(rawSize).
|
||||||
4. NOTE: If rawSize is undefined, then numSize will be NaN.
|
4. NOTE: If rawSize is undefined, then numSize will be NaN.
|
||||||
5. If numSize is NaN, throw a TypeError exception.
|
5. If numSize is NaN, throw a TypeError exception.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const s1 = new Set([1, 2]);
|
const s1 = new Set([1, 2]);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union works on subclasses of Set, but never calls the receiver's size/has/keys methods
|
description: Set.prototype.union works on subclasses of Set, but never calls the receiver's size/has/keys methods
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union works on subclasses of Set, but returns an instance of Set even when Symbol.species is overridden.
|
description: Set.prototype.union works on subclasses of Set, but returns an instance of Set even when Symbol.species is overridden.
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union works on subclasses of Set, but returns an instance of Set
|
description: Set.prototype.union works on subclasses of Set, but returns an instance of Set
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
esid: sec-set.prototype.union
|
esid: sec-set.prototype.union
|
||||||
description: Set.prototype.union properties
|
description: Set.prototype.union properties
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
features: [Set-methods]
|
features: [set-methods]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user