Chromium Code Reviews| Index: test/mjsunit/harmony/destructuring.js |
| diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0ddda04285b29cb645e1ff38db56226e6255d470 |
| --- /dev/null |
| +++ b/test/mjsunit/harmony/destructuring.js |
| @@ -0,0 +1,14 @@ |
| +// Copyright 2015 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// |
| +// Flags: --harmony-destructuring |
| + |
| +(function TestObjectLiteralPattern() { |
| + var { x : x, y : y } = { x : 1, y : 2 }; |
| + assertEquals(1, x); |
| + assertEquals(2, y); |
| + |
| + var {z} = { z : 3 }; |
|
arv (Not doing code reviews)
2015/05/11 14:25:16
Maybe add let and const tests too and add TDZ chec
Dmitry Lomov (no reviews)
2015/05/11 14:53:26
This CL is just a rudimentary implementation of de
|
| + assertEquals(3, z); |
| +}()); |