Add other missing Symbol feature flags

This commit is contained in:
Leo Balter 2017-09-07 18:44:11 -04:00 committed by Rick Waldron
parent ca1871bafd
commit 7f88a6d7f9
24 changed files with 24 additions and 0 deletions

View File

@ -8,6 +8,7 @@ info: >
The GlobalSymbolRegistry is a List that is globally available. It is shared 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 by all realms. Prior to the evaluation of any ECMAScript code it is
initialized as a new empty List. initialized as a new empty List.
features: [Symbol]
---*/ ---*/
var OSymbol = $262.createRealm().global.Symbol; var OSymbol = $262.createRealm().global.Symbol;

View File

@ -20,6 +20,7 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.for.length, 1); assert.sameValue(Symbol.for.length, 1);

View File

@ -17,6 +17,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.for.name, "for"); assert.sameValue(Symbol.for.name, "for");

View File

@ -9,6 +9,7 @@ info: >
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(typeof Symbol.for, 'function'); assert.sameValue(typeof Symbol.for, 'function');

View File

@ -15,6 +15,7 @@ info: >
5. Append the Record { [[Key]]: stringKey, [[Symbol]]: newSymbol } to the 5. Append the Record { [[Key]]: stringKey, [[Symbol]]: newSymbol } to the
GlobalSymbolRegistry List. GlobalSymbolRegistry List.
6. Return newSymbol. 6. Return newSymbol.
features: [Symbol]
---*/ ---*/
var canonical = Symbol.for('s'); var canonical = Symbol.for('s');

View File

@ -8,6 +8,7 @@ info: >
1. If Type(sym) is not Symbol, throw a TypeError exception. 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), 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]]. a. If SameValue(e.[[Symbol]], sym) is true, return e.[[Key]].
features: [Symbol]
---*/ ---*/
var canonical = Symbol.for('s'); var canonical = Symbol.for('s');

View File

@ -8,6 +8,7 @@ info: >
The GlobalSymbolRegistry is a List that is globally available. It is shared 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 by all realms. Prior to the evaluation of any ECMAScript code it is
initialized as a new empty List. initialized as a new empty List.
features: [Symbol]
---*/ ---*/
var OSymbol = $262.createRealm().global.Symbol; var OSymbol = $262.createRealm().global.Symbol;

View File

@ -20,6 +20,7 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.keyFor.length, 1); assert.sameValue(Symbol.keyFor.length, 1);

View File

@ -17,6 +17,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.keyFor.name, "keyFor"); assert.sameValue(Symbol.keyFor.name, "keyFor");

View File

@ -9,6 +9,7 @@ info: >
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(typeof Symbol.keyFor, 'function'); assert.sameValue(typeof Symbol.keyFor, 'function');

View File

@ -9,6 +9,7 @@ description: >
Besides the length property (whose value is 0) Besides the length property (whose value is 0)
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.length, 0, "The value of `Symbol.length` is `0`"); assert.sameValue(Symbol.length, 0, "The value of `Symbol.length` is `0`");

View File

@ -7,6 +7,7 @@ description: >
Symbol ( [ description ] ) Symbol ( [ description ] )
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.name, "Symbol", "The value of `Symbol.name` is `'Symbol'`"); assert.sameValue(Symbol.name, "Symbol", "The value of `Symbol.name` is `'Symbol'`");

View File

@ -9,6 +9,7 @@ info: >
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.prototype.constructor, Symbol); assert.sameValue(Symbol.prototype.constructor, Symbol);

View File

@ -20,6 +20,7 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.prototype.toString.length, 0); assert.sameValue(Symbol.prototype.toString.length, 0);

View File

@ -17,6 +17,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.prototype.toString.name, "toString"); assert.sameValue(Symbol.prototype.toString.name, "toString");

View File

@ -9,6 +9,7 @@ info: >
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(typeof Symbol.prototype.toString, 'function'); assert.sameValue(typeof Symbol.prototype.toString, 'function');

View File

@ -20,6 +20,7 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.prototype.valueOf.length, 0); assert.sameValue(Symbol.prototype.valueOf.length, 0);

View File

@ -17,6 +17,7 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(Symbol.prototype.valueOf.name, "valueOf"); assert.sameValue(Symbol.prototype.valueOf.name, "valueOf");

View File

@ -9,6 +9,7 @@ info: >
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
assert.sameValue(typeof Symbol.prototype.valueOf, 'function'); assert.sameValue(typeof Symbol.prototype.valueOf, 'function');

View File

@ -8,6 +8,7 @@ info: |
1. Let s be the this value. 1. Let s be the this value.
2. If Type(s) is Symbol, return s. 2. If Type(s) is Symbol, return s.
3. If Type(s) is not Object, throw a TypeError exception. 3. If Type(s) is not Object, throw a TypeError exception.
features: [Symbol]
---*/ ---*/
var valueOf = Symbol.prototype.valueOf; var valueOf = Symbol.prototype.valueOf;

View File

@ -9,6 +9,7 @@ info: |
2. If Type(s) is Symbol, return s. 2. If Type(s) is Symbol, return s.
3. If Type(s) is not Object, throw a TypeError exception. 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. 4. If s does not have a [[SymbolData]] internal slot, throw a TypeError exception.
features: [Symbol]
---*/ ---*/
var valueOf = Symbol.prototype.valueOf; var valueOf = Symbol.prototype.valueOf;

View File

@ -8,6 +8,7 @@ description: >
value of the Symbol property of the global object. value of the Symbol property of the global object.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Symbol]
---*/ ---*/
verifyNotEnumerable(this, "Symbol"); verifyNotEnumerable(this, "Symbol");

View File

@ -15,6 +15,7 @@ info: >
... ...
1. If NewTarget is not undefined, throw a TypeError exception. 1. If NewTarget is not undefined, throw a TypeError exception.
features: [Symbol]
---*/ ---*/
class S1 extends Symbol {} class S1 extends Symbol {}

View File

@ -11,6 +11,7 @@ info: >
be subclassed. It may be used as the value of an extends clause of a class 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. definition but a super call to the Symbol constructor will cause an exception.
... ...
features: [Symbol]
---*/ ---*/
class S extends Symbol {} class S extends Symbol {}