OLD | NEW |
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-assignment --harmony-destructuring-bind | |
6 | |
7 // script-level tests | 5 // script-level tests |
8 var ox, oy = {}, oz; | 6 var ox, oy = {}, oz; |
9 ({ | 7 ({ |
10 x: ox, | 8 x: ox, |
11 y: oy.value, | 9 y: oy.value, |
12 y2: oy["value2"], | 10 y2: oy["value2"], |
13 z: ({ set v(val) { oz = val; } }).v | 11 z: ({ set v(val) { oz = val; } }).v |
14 } = { | 12 } = { |
15 x: "value of x", | 13 x: "value of x", |
16 y: "value of y1", | 14 y: "value of y1", |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 assertEquals(["s", "p", "o", "r", "k"], x.rest); | 471 assertEquals(["s", "p", "o", "r", "k"], x.rest); |
474 break; | 472 break; |
475 } | 473 } |
476 log.push({ firstLetter: x.firstLetter, rest: x.rest }); | 474 log.push({ firstLetter: x.firstLetter, rest: x.rest }); |
477 } | 475 } |
478 assertEquals([ | 476 assertEquals([ |
479 { firstLetter: "\u{1F382}", rest: ["c", "a", "k", "e"] }, | 477 { firstLetter: "\u{1F382}", rest: ["c", "a", "k", "e"] }, |
480 { firstLetter: "B", rest: ["p", "u", "p", "p", "y"] }, | 478 { firstLetter: "B", rest: ["p", "u", "p", "p", "y"] }, |
481 ], log); | 479 ], log); |
482 })(); | 480 })(); |
OLD | NEW |