blob: a1fd2c8fd7adfa42b23b56cb32753fa3d42cebe1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (C) 2019 Alexey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
compareArray correctly formats Symbols in error message.
includes: [compareArray.js]
features: [Symbol]
---*/
var threw = false;
try {
assert.compareArray([Symbol()], [Symbol('desc')]);
} catch (err) {
threw = true;
assert.sameValue(err.constructor, Test262Error);
assert(err.message.indexOf('[Symbol()]') !== -1);
assert(err.message.indexOf('[Symbol(desc)]') !== -1);
}
assert(threw);
reportCompare(0, 0);
|