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
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;

View File

@ -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);

View File

@ -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");

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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;

View File

@ -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);

View File

@ -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");

View File

@ -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');

View File

@ -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`");

View File

@ -7,6 +7,7 @@ description: >
Symbol ( [ description ] )
includes: [propertyHelper.js]
features: [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,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
features: [Symbol]
---*/
assert.sameValue(Symbol.prototype.constructor, Symbol);

View File

@ -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);

View File

@ -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");

View File

@ -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');

View File

@ -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);

View File

@ -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");

View File

@ -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');

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -15,6 +15,7 @@ info: >
...
1. If NewTarget is not undefined, throw a TypeError exception.
features: [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
definition but a super call to the Symbol constructor will cause an exception.
...
features: [Symbol]
---*/
class S extends Symbol {}