OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-tostring --allow-natives-syntax | 5 // Flags: --harmony-tostring |
6 | 6 |
7 var global = this; | 7 var global = this; |
8 | 8 |
9 var funs = { | 9 var funs = { |
10 Object: [ Object ], | 10 Object: [ Object ], |
11 Function: [ Function ], | 11 Function: [ Function ], |
12 Array: [ Array ], | 12 Array: [ Array ], |
13 String: [ String ], | 13 String: [ String ], |
14 Boolean: [ Boolean ], | 14 Boolean: [ Boolean ], |
15 Number: [ Number ], | 15 Number: [ Number ], |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 assertFalse(desc.enumerable); | 130 assertFalse(desc.enumerable); |
131 assertTrue(desc.configurable); | 131 assertTrue(desc.configurable); |
132 } | 132 } |
133 testObjectToStringPropertyDesc(); | 133 testObjectToStringPropertyDesc(); |
134 | 134 |
135 function testObjectToStringOwnNonStringValue() { | 135 function testObjectToStringOwnNonStringValue() { |
136 var obj = Object.defineProperty({}, Symbol.toStringTag, { value: 1 }); | 136 var obj = Object.defineProperty({}, Symbol.toStringTag, { value: 1 }); |
137 assertEquals("[object Object]", ({}).toString.call(obj)); | 137 assertEquals("[object Object]", ({}).toString.call(obj)); |
138 } | 138 } |
139 testObjectToStringOwnNonStringValue(); | 139 testObjectToStringOwnNonStringValue(); |
OLD | NEW |