1// 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 5function testJSONToString() { 6 assertEquals('[object JSON]', "" + JSON); 7 assertEquals("JSON", JSON[Symbol.toStringTag]); 8 var desc = Object.getOwnPropertyDescriptor(JSON, Symbol.toStringTag); 9 assertTrue(desc.configurable); 10 assertFalse(desc.writable); 11 assertEquals("JSON", desc.value); 12 delete JSON[Symbol.toStringTag]; 13 assertEquals('[object Object]', "" + JSON); 14} 15testJSONToString(); 16