| Index: test/mjsunit/harmony/symbols.js
|
| diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js
|
| index d19aece5b17202f6bd1b9e841561f5691c56fc86..e7bf36040621d5541378614d2d5e657b1b2ea463 100644
|
| --- a/test/mjsunit/harmony/symbols.js
|
| +++ b/test/mjsunit/harmony/symbols.js
|
| @@ -410,12 +410,29 @@ function TestGetOwnPropertySymbolsWithProto() {
|
| TestGetOwnPropertySymbolsWithProto()
|
|
|
|
|
| -function TestRegistry() {
|
| - assertFalse(Symbol.for("@@create") === Symbol.create)
|
| - assertFalse(Symbol.for("@@iterator") === Symbol.iterator)
|
| - assertTrue(Symbol.keyFor(Symbol.create) === undefined)
|
| - assertTrue(Symbol.keyFor(Symbol.iterator) === undefined)
|
| +function TestWellKnown() {
|
| + var symbols = [
|
| + "create", "hasInstance", "isConcatSpreadable", "isRegExp",
|
| + "iterator", "toStringTag", "unscopables"
|
| + ]
|
|
|
| + for (var i in symbols) {
|
| + var name = symbols[i]
|
| + var desc = Object.getOwnPropertyDescriptor(Symbol, name)
|
| + assertSame("symbol", typeof desc.value)
|
| + assertSame("Symbol(Symbol." + name + ")", desc.value.toString())
|
| + assertFalse(desc.writable)
|
| + assertFalse(desc.configurable)
|
| + assertFalse(desc.enumerable)
|
| +
|
| + assertFalse(Symbol.for("Symbol." + name) === desc.value)
|
| + assertTrue(Symbol.keyFor(desc.value) === undefined)
|
| + }
|
| +}
|
| +TestWellKnown()
|
| +
|
| +
|
| +function TestRegistry() {
|
| var symbol1 = Symbol.for("x1")
|
| var symbol2 = Symbol.for("x2")
|
| assertFalse(symbol1 === symbol2)
|
|
|