Debian Codegraph @

js/src/tests/test262/harness/compare-array-same-elements-different-order.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 Arrays containg the same elements in different order are not equivalent.
7 includes: [compareArray.js]
8 ---*/
9
10 var obj = {};
11 var first = [0, 1, '', 's', null, undefined, obj];
12 var second = [0, 1, '', 's', undefined, null, obj];
13
14 assert.throws(Test262Error, () => {
15 assert.compareArray(first, second);
16 }, 'Arrays containing the same elements in different order are not equivalent.');
17
18 reportCompare(0, 0);