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

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

Issue 961823002: Fix issue with class name TDZ in computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment out strong test Created 5 years, 10 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 | « src/parser.cc ('k') | test/mjsunit/harmony/computed-property-names-classes.js » ('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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 assertEquals(proto, object.__proto__); 270 assertEquals(proto, object.__proto__);
271 assertTrue(object.hasOwnProperty('__proto__')); 271 assertTrue(object.hasOwnProperty('__proto__'));
272 272
273 object = { 273 object = {
274 [ID('x')]: 'X', 274 [ID('x')]: 'X',
275 __proto__: proto 275 __proto__: proto
276 }; 276 };
277 assertEquals('X', object.x); 277 assertEquals('X', object.x);
278 assertEquals(proto, Object.getPrototypeOf(object)); 278 assertEquals(proto, Object.getPrototypeOf(object));
279 })(); 279 })();
280
281
282 (function TestExceptionInName() {
283 function MyError() {};
284 function throwMyError() {
285 throw new MyError();
286 }
287 assertThrows(function() {
288 var o = {
289 [throwMyError()]: 42
290 };
291 }, MyError);
292 assertThrows(function() {
293 var o = {
294 get [throwMyError()]() { return 42; }
295 };
296 }, MyError);
297 assertThrows(function() {
298 var o = {
299 set [throwMyError()](_) { }
300 };
301 }, MyError);
302 })();
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/computed-property-names-classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698