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

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

Issue 1450193002: Rename destructuring flag to "--harmony-destructuring-bind" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 // 4 //
5 // Flags: --harmony-destructuring 5 // Flags: --harmony-destructuring-bind
6 // Flags: --harmony-default-parameters --harmony-rest-parameters 6 // Flags: --harmony-default-parameters --harmony-rest-parameters
7 7
8 (function TestObjectLiteralPattern() { 8 (function TestObjectLiteralPattern() {
9 var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 }; 9 var { x : x, y : y, get, set } = { x : 1, y : 2, get: 3, set: 4 };
10 assertEquals(1, x); 10 assertEquals(1, x);
11 assertEquals(2, y); 11 assertEquals(2, y);
12 assertEquals(3, get); 12 assertEquals(3, get);
13 assertEquals(4, set); 13 assertEquals(4, set);
14 14
15 var {z} = { z : 3 }; 15 var {z} = { z : 3 };
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 throw [1, 2, 3]; 1124 throw [1, 2, 3];
1125 } catch ([foo, ...bar]) { 1125 } catch ([foo, ...bar]) {
1126 assertEquals(1, foo); 1126 assertEquals(1, foo);
1127 assertEquals([2, 3], bar); 1127 assertEquals([2, 3], bar);
1128 } 1128 }
1129 1129
1130 assertEquals("hello", foo); 1130 assertEquals("hello", foo);
1131 assertEquals("world", bar); 1131 assertEquals("world", bar);
1132 assertEquals(42, baz); 1132 assertEquals(42, baz);
1133 })(); 1133 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698