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

Side by Side Diff: test/mjsunit/es6/destructuring.js

Issue 1776683003: Remove destructuring and default arguments runtime flags (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 //
5 // Flags: --harmony-destructuring-bind
6 // Flags: --harmony-default-parameters
7 4
8 (function TestObjectLiteralPattern() { 5 (function TestObjectLiteralPattern() {
9 var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 }; 6 var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 };
10 assertEquals(1, x); 7 assertEquals(1, x);
11 assertEquals(2, y); 8 assertEquals(2, y);
12 assertEquals(3, get); 9 assertEquals(3, get);
13 assertEquals(4, set); 10 assertEquals(4, set);
14 11
15 var {z} = { z : 3 }; 12 var {z} = { z : 3 };
16 assertEquals(3, z); 13 assertEquals(3, z);
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 assertEquals([2, 3], bar); 1125 assertEquals([2, 3], bar);
1129 } 1126 }
1130 1127
1131 assertEquals("hello", foo); 1128 assertEquals("hello", foo);
1132 assertEquals("world", bar); 1129 assertEquals("world", bar);
1133 assertEquals(42, baz); 1130 assertEquals(42, baz);
1134 1131
1135 assertEquals(undefined, eval('try {throw {foo: 1, bar: 2}} catch({foo}) {}')); 1132 assertEquals(undefined, eval('try {throw {foo: 1, bar: 2}} catch({foo}) {}'));
1136 assertEquals(undefined, eval('try {throw [1, 2, 3]} catch([x]) {}')); 1133 assertEquals(undefined, eval('try {throw [1, 2, 3]} catch([x]) {}'));
1137 })(); 1134 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/default-parameters-destructuring.js ('k') | test/mjsunit/es6/destructuring-assignment.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698