Lines Matching full:symbol

38   return ["Symbol(66)", "Symbol()"].indexOf(s) >= 0;
44 function indirectSymbol() { return Symbol() }
48 symbols.push(Symbol())
49 symbols.push(Symbol(undefined))
50 symbols.push(Symbol("66"))
51 symbols.push(Symbol(66))
52 symbols.push(Symbol().valueOf())
59 assertThrows(function () { Symbol(Symbol()) }, TypeError)
60 assertThrows(function () { new Symbol(66) }, TypeError)
67 assertEquals("symbol", typeof symbols[i])
68 assertTrue(typeof symbols[i] === "symbol")
71 assertEquals("Symbol", %_ClassOf(Object(symbols[i])))
78 assertSame(Object.prototype, Symbol.prototype.__proto__)
79 assertSame(Symbol.prototype, Symbol().__proto__)
80 assertSame(Symbol.prototype, Object(Symbol()).__proto__)
82 assertSame(Symbol.prototype, symbols[i].__proto__)
89 assertSame(Function.prototype, Symbol.__proto__)
90 assertFalse(Object === Symbol.prototype.constructor)
91 assertFalse(Symbol === Object.prototype.constructor)
92 assertSame(Symbol, Symbol.prototype.constructor)
93 assertSame(Symbol, Symbol().__proto__.constructor)
94 assertSame(Symbol, Object(Symbol()).__proto__.constructor)
96 assertSame(Symbol, symbols[i].__proto__.constructor)
106 assertTrue(Symbol.prototype.valueOf.call(Object(symbols[i])) === symbols[i])
107 assertTrue(Symbol.prototype.valueOf.call(symbols[i]) === symbols[i])
122 isValidSymbolString(Symbol.prototype.toString.call(symbols[i])))
124 "[object Symbol]", Object.prototype.toString.call(symbols[i]))
161 // Every symbol should equal itself, and non-strictly equal its wrapper.
233 // Test Symbol wrapping/boxing over non-builtins.
234 Symbol.prototype.getThisProto = function () {
239 assertTrue(symbols[i].getThisProto() === Symbol.prototype)
327 assertEquals("symbol", typeof syms[i])
403 // but not between scavenges. This must also apply for symbol keys.
404 var key = Symbol("key");
451 var desc = Object.getOwnPropertyDescriptor(Symbol, name)
452 assertSame("symbol", typeof desc.value)
453 assertSame("Symbol(Symbol." + name + ")", desc.value.toString())
458 assertFalse(Symbol.for("Symbol." + name) === desc.value)
459 assertTrue(Symbol.keyFor(desc.value) === undefined)
466 var symbol1 = Symbol.for("x1")
467 var symbol2 = Symbol.for("x2")
470 assertSame(symbol1, Symbol.for("x1"))
471 assertSame(symbol2, Symbol.for("x2"))
472 assertSame("x1", Symbol.keyFor(symbol1))
473 assertSame("x2", Symbol.keyFor(symbol2))
475 assertSame(Symbol.for("1"), Symbol.for(1))
476 assertThrows(function() { Symbol.keyFor("bla") }, TypeError)
477 assertThrows(function() { Symbol.keyFor({}) }, TypeError)
480 assertFalse(Symbol === Realm.eval(realm, "Symbol"))
481 assertFalse(Symbol.for === Realm.eval(realm, "Symbol.for"))
482 assertFalse(Symbol.keyFor === Realm.eval(realm, "Symbol.keyFor"))
483 assertSame(Symbol.create, Realm.eval(realm, "Symbol.create"))
484 assertSame(Symbol.iterator, Realm.eval(realm, "Symbol.iterator"))
486 assertSame(symbol1, Realm.eval(realm, "Symbol.for")("x1"))
487 assertSame(symbol1, Realm.eval(realm, "Symbol.for('x1')"))
488 assertSame("x1", Realm.eval(realm, "Symbol.keyFor")(symbol1))
490 assertSame("x1", Realm.eval(realm, "Symbol.keyFor(Realm.shared)"))
492 var symbol3 = Realm.eval(realm, "Symbol.for('x3')")
495 assertSame(symbol3, Symbol.for("x3"))
496 assertSame("x3", Symbol.keyFor(symbol3))
510 function lt() { var a = Symbol(); var b = Symbol(); a < b; }
511 function gt() { var a = Symbol(); var b = Symbol(); a > b; }
512 function le() { var a = Symbol(); var b = Symbol(); a <= b; }
513 function ge() { var a = Symbol(); var b = Symbol(); a >= b; }
514 function lt_same() { var a = Symbol(); a < a; }
515 function gt_same() { var a = Symbol(); a > a; }
516 function le_same() { var a = Symbol(); a <= a; }
517 function ge_same() { var a = Symbol(); a >= a; }
531 // Make sure that throws occur in the context of the Symbol function.
534 var rSymbol = Realm.eval(r, "Symbol");
537 function verifier(symbol, error) { argument
539 new symbol();
546 assertTrue(verifier(Symbol, TypeError()));
548 assertFalse(verifier(Symbol, rError()));
559 TestStringify(undefined, Symbol("a"));
560 TestStringify('[{}]', [Object(Symbol())]);
561 var symbol_wrapper = Object(Symbol("a"))