tests/auto/qml/ecmascripttests/test262/test/built-ins/Boolean/symbol-coercion.js
raw| 1 | // Copyright (C) 2013 the V8 project authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | /*--- |
| 4 | esid: sec-toboolean |
| 5 | es6id: 7.1.2 |
| 6 | description: > |
| 7 | Boolean coercion operations on Symbols |
| 8 | features: [Symbol] |
| 9 | ---*/ |
| 10 | var sym = Symbol(); |
| 11 | |
| 12 | assert.sameValue(Boolean(sym).valueOf(), true, "`Boolean(sym).valueOf()` returns `true`"); |