summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/toString/symbol-tag-str.js
blob: b3497808ed368f24c9bfd10e771164cf3beb905b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: >
    String values of `Symbol.toStringTag` property are honored
es6id: 19.1.3.6
info: |
    16. Let tag be Get (O, @@toStringTag).
    17. ReturnIfAbrupt(tag).
    18. If Type(tag) is not String, let tag be builtinTag.
    19. Return the String that is the result of concatenating "[object ", tag,
        and "]".
features: [Symbol.toStringTag]
---*/

var custom = {};
custom[Symbol.toStringTag] = 'test262';

assert.sameValue(Object.prototype.toString.call(custom), '[object test262]');

reportCompare(0, 0);