mirror of https://github.com/tc39/test262.git
Add other missing Symbol feature flags
This commit is contained in:
parent
ca1871bafd
commit
7f88a6d7f9
|
@ -8,6 +8,7 @@ info: >
|
|||
The GlobalSymbolRegistry is a List that is globally available. It is shared
|
||||
by all realms. Prior to the evaluation of any ECMAScript code it is
|
||||
initialized as a new empty List.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var OSymbol = $262.createRealm().global.Symbol;
|
||||
|
|
|
@ -20,6 +20,7 @@ info: >
|
|||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.for.length, 1);
|
||||
|
|
|
@ -17,6 +17,7 @@ info: >
|
|||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.for.name, "for");
|
||||
|
|
|
@ -9,6 +9,7 @@ info: >
|
|||
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(typeof Symbol.for, 'function');
|
||||
|
|
|
@ -15,6 +15,7 @@ info: >
|
|||
5. Append the Record { [[Key]]: stringKey, [[Symbol]]: newSymbol } to the
|
||||
GlobalSymbolRegistry List.
|
||||
6. Return newSymbol.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var canonical = Symbol.for('s');
|
||||
|
|
|
@ -8,6 +8,7 @@ info: >
|
|||
1. If Type(sym) is not Symbol, throw a TypeError exception.
|
||||
2. For each element e of the GlobalSymbolRegistry List (see 19.4.2.1),
|
||||
a. If SameValue(e.[[Symbol]], sym) is true, return e.[[Key]].
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var canonical = Symbol.for('s');
|
||||
|
|
|
@ -8,6 +8,7 @@ info: >
|
|||
The GlobalSymbolRegistry is a List that is globally available. It is shared
|
||||
by all realms. Prior to the evaluation of any ECMAScript code it is
|
||||
initialized as a new empty List.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var OSymbol = $262.createRealm().global.Symbol;
|
||||
|
|
|
@ -20,6 +20,7 @@ info: >
|
|||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.keyFor.length, 1);
|
||||
|
|
|
@ -17,6 +17,7 @@ info: >
|
|||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.keyFor.name, "keyFor");
|
||||
|
|
|
@ -9,6 +9,7 @@ info: >
|
|||
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(typeof Symbol.keyFor, 'function');
|
||||
|
|
|
@ -9,6 +9,7 @@ description: >
|
|||
Besides the length property (whose value is 0)
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.length, 0, "The value of `Symbol.length` is `0`");
|
||||
|
|
|
@ -7,6 +7,7 @@ description: >
|
|||
Symbol ( [ description ] )
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.name, "Symbol", "The value of `Symbol.name` is `'Symbol'`");
|
||||
|
|
|
@ -9,6 +9,7 @@ info: >
|
|||
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.prototype.constructor, Symbol);
|
||||
|
|
|
@ -20,6 +20,7 @@ info: >
|
|||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.prototype.toString.length, 0);
|
||||
|
|
|
@ -17,6 +17,7 @@ info: >
|
|||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.prototype.toString.name, "toString");
|
||||
|
|
|
@ -9,6 +9,7 @@ info: >
|
|||
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(typeof Symbol.prototype.toString, 'function');
|
||||
|
|
|
@ -20,6 +20,7 @@ info: >
|
|||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.prototype.valueOf.length, 0);
|
||||
|
|
|
@ -17,6 +17,7 @@ info: >
|
|||
object, if it exists, has the attributes { [[Writable]]: false,
|
||||
[[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Symbol.prototype.valueOf.name, "valueOf");
|
||||
|
|
|
@ -9,6 +9,7 @@ info: >
|
|||
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
assert.sameValue(typeof Symbol.prototype.valueOf, 'function');
|
||||
|
|
|
@ -8,6 +8,7 @@ info: |
|
|||
1. Let s be the this value.
|
||||
2. If Type(s) is Symbol, return s.
|
||||
3. If Type(s) is not Object, throw a TypeError exception.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var valueOf = Symbol.prototype.valueOf;
|
||||
|
|
|
@ -9,6 +9,7 @@ info: |
|
|||
2. If Type(s) is Symbol, return s.
|
||||
3. If Type(s) is not Object, throw a TypeError exception.
|
||||
4. If s does not have a [[SymbolData]] internal slot, throw a TypeError exception.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var valueOf = Symbol.prototype.valueOf;
|
||||
|
|
|
@ -8,6 +8,7 @@ description: >
|
|||
value of the Symbol property of the global object.
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(this, "Symbol");
|
||||
|
|
|
@ -15,6 +15,7 @@ info: >
|
|||
|
||||
...
|
||||
1. If NewTarget is not undefined, throw a TypeError exception.
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
class S1 extends Symbol {}
|
||||
|
|
|
@ -11,6 +11,7 @@ info: >
|
|||
be subclassed. It may be used as the value of an extends clause of a class
|
||||
definition but a super call to the Symbol constructor will cause an exception.
|
||||
...
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
class S extends Symbol {}
|
||||
|
|
Loading…
Reference in New Issue