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

Side by Side Diff: test/mjsunit/harmony/computed-property-names.js

Issue 850773004: Computed property names: Enable test on windows again (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Full url in todo 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 | « no previous file | test/mjsunit/mjsunit.status » ('j') | 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-computed-property-names 5 // Flags: --harmony-computed-property-names
6 6
7 7
8 function ID(x) { 8 function ID(x) {
9 return x; 9 return x;
10 } 10 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 assertArrayEquals(['1', '2', 'a', 'c'], Object.keys(object)); 121 assertArrayEquals(['1', '2', 'a', 'c'], Object.keys(object));
122 })(); 122 })();
123 123
124 124
125 (function TestDoubleName() { 125 (function TestDoubleName() {
126 var object = { 126 var object = {
127 [1.2]: 'A', 127 [1.2]: 'A',
128 [1e55]: 'B', 128 [1e55]: 'B',
129 [0.000001]: 'C', 129 [0.000001]: 'C',
130 [-0]: 'D', 130 [-0]: 'D',
131 [Infinity]: 'E', 131 // TODO(arv): https://code.google.com/p/v8/issues/detail?id=3815
132 [-Infinity]: 'F', 132 // [Infinity]: 'E',
133 // [-Infinity]: 'F',
133 [NaN]: 'G', 134 [NaN]: 'G',
134 }; 135 };
135 assertEquals('A', object['1.2']); 136 assertEquals('A', object['1.2']);
136 assertEquals('B', object['1e+55']); 137 assertEquals('B', object['1e+55']);
137 assertEquals('C', object['0.000001']); 138 assertEquals('C', object['0.000001']);
138 assertEquals('D', object[0]); 139 assertEquals('D', object[0]);
139 assertEquals('E', object[Infinity]); 140 // TODO(arv): https://code.google.com/p/v8/issues/detail?id=3815
140 assertEquals('F', object[-Infinity]); 141 // assertEquals('E', object[Infinity]);
142 // assertEquals('F', object[-Infinity]);
141 assertEquals('G', object[NaN]); 143 assertEquals('G', object[NaN]);
142 })(); 144 })();
143 145
144 146
145 (function TestGetter() { 147 (function TestGetter() {
146 var object = { 148 var object = {
147 get ['a']() { 149 get ['a']() {
148 return 'A'; 150 return 'A';
149 } 151 }
150 }; 152 };
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 }; 263 };
262 assertEquals(proto, Object.getPrototypeOf(object)); 264 assertEquals(proto, Object.getPrototypeOf(object));
263 265
264 var object = { 266 var object = {
265 ['__proto__']: proto 267 ['__proto__']: proto
266 }; 268 };
267 assertEquals(Object.prototype, Object.getPrototypeOf(object)); 269 assertEquals(Object.prototype, Object.getPrototypeOf(object));
268 assertEquals(proto, object.__proto__); 270 assertEquals(proto, object.__proto__);
269 assertTrue(object.hasOwnProperty('__proto__')); 271 assertTrue(object.hasOwnProperty('__proto__'));
270 })(); 272 })();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698