Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/literals/regexp/inequality.js

raw
1 // Copyright (C) 2016 Kevin Gibbons. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 description: Regular expression literals should not compare as equal even if they appear in the same source position.
5 esid: sec-regular-expression-literals-runtime-semantics-evaluation
6 ---*/
7
8 function makeRegExp() {
9 return /(?:)/;
10 }
11
12 assert.notSameValue(makeRegExp(), makeRegExp());
13
14 var values = [];
15 for (var i = 0; i < 2; ++i) {
16 values[i] = /(?:)/;
17 }
18
19 assert.notSameValue(values[0], values[1]);