MCPcopy Create free account
hub / github.com/nodejs/node / TestToString

Function TestToString

deps/v8/test/mjsunit/harmony/private.js:82–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81
82function TestToString() {
83 for (var i in symbols) {
84 assertThrows(function() {new String(symbols[i]) }, TypeError)
85 assertEquals(symbols[i].toString(), String(symbols[i]))
86 assertThrows(function() { symbols[i] + "" }, TypeError)
87 assertTrue(isValidSymbolString(symbols[i].toString()))
88 assertTrue(isValidSymbolString(Object(symbols[i]).toString()))
89 assertTrue(isValidSymbolString(Symbol.prototype.toString.call(symbols[i])))
90 assertEquals(
91 "[object Symbol]", Object.prototype.toString.call(symbols[i]))
92 }
93}
94TestToString()
95
96

Callers 1

private.jsFile · 0.70

Calls 8

StringClass · 0.85
ObjectFunction · 0.85
isValidSymbolStringFunction · 0.70
assertThrowsFunction · 0.50
assertEqualsFunction · 0.50
assertTrueFunction · 0.50
toStringMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected