blob: 3fad08318fa86a58de2804076af12761ff8c49a1 [file] [log] [blame]
Emily Bernier958fae72015-03-24 16:35:39 -04001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --harmony-tostring
6
7function testJSONToString() {
8 assertEquals('[object JSON]', "" + JSON);
9 assertEquals("JSON", JSON[Symbol.toStringTag]);
10 var desc = Object.getOwnPropertyDescriptor(JSON, Symbol.toStringTag);
11 assertTrue(desc.configurable);
12 assertFalse(desc.writable);
13 assertEquals("JSON", desc.value);
14}
15testJSONToString();