Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/mjsunit/es6/object-tostring.js

Issue 835753002: Implement ES6 Array.prototype.toString behind --harmony-tostring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Simplify CL Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/array-tostring.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 ],
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 new String("str") 124 new String("str")
125 ].forEach(testToStringTagNonString); 125 ].forEach(testToStringTagNonString);
126 126
127 function testObjectToStringPropertyDesc() { 127 function testObjectToStringPropertyDesc() {
128 var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString"); 128 var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString");
129 assertTrue(desc.writable); 129 assertTrue(desc.writable);
130 assertFalse(desc.enumerable); 130 assertFalse(desc.enumerable);
131 assertTrue(desc.configurable); 131 assertTrue(desc.configurable);
132 } 132 }
133 testObjectToStringPropertyDesc(); 133 testObjectToStringPropertyDesc();
134
135 function testObjectToStringOwnNonStringValue() {
136 var obj = Object.defineProperty({}, Symbol.toStringTag, { value: 1 });
137 assertEquals("[object ???]", ({}).toString.call(obj));
138 }
139 testObjectToStringOwnNonStringValue();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/array-tostring.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698