Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/equals/symbol-strict-equality-comparison.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 es6id: 7.2.13
5 description: >
6 Strict Equality Comparison: Symbol
7 features: [Symbol]
8 ---*/
9 var symA = Symbol('66');
10 var symB = Symbol('66');
11
12 assert.sameValue(symA === symA, true, "The result of `symA === symA` is `true`");
13 assert.sameValue(symA === symA.valueOf(), true, "The result of `symA === symA.valueOf()` is `true`");
14 assert.sameValue(symA.valueOf() === symA, true, "The result of `symA.valueOf() === symA` is `true`");
15
16 assert.sameValue(symB === symB, true, "The result of `symB === symB` is `true`");
17 assert.sameValue(symB === symB.valueOf(), true, "The result of `symB === symB.valueOf()` is `true`");
18 assert.sameValue(symB.valueOf() === symB, true, "The result of `symB.valueOf() === symB` is `true`");
19
20 assert.sameValue(symA === symB, false, "The result of `symA === symB` is `false`");