Remove tests that allow `...{` in object destructuring. Ref gh-1050

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2017-06-23 13:15:52 -04:00
parent a2f44c7151
commit a57ffd11e1
3 changed files with 0 additions and 83 deletions

View File

@ -1,25 +0,0 @@
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
When DestructuringAssignmentTarget is an object literal, it should be parsed
parsed as a DestructuringAssignmentPattern and evaluated as a destructuring
assignment.
template: default
esid: pending
features: [object-rest]
---*/
//- setup
var obj = {a: 3, b: 4};
//- elems
{a, b, ...{c, e}}
//- vals
{a: 1, b: 2, c: 3, d: 4, e: 5}
//- body
assert.sameValue(a, 1);
assert.sameValue(b, 2);
assert.sameValue(c, 3);
assert.sameValue(e, 5);

View File

@ -1,34 +0,0 @@
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
When DestructuringAssignmentTarget is an object literal, it should be parsed
parsed as a DestructuringAssignmentPattern and evaluated as a destructuring
assignment and object rest desconstruction is allowed in that case.
template: default
esid: pending
includes: [propertyHelper.js]
features: [object-rest]
---*/
//- elems
{a, b, ...{c, ...rest}}
//- vals
{a: 1, b: 2, c: 3, d: 4, e: 5}
//- body
assert.sameValue(a, 1);
assert.sameValue(b, 2);
assert.sameValue(c, 3);
assert.sameValue(rest.d, 4);
assert.sameValue(rest.e, 5);
verifyEnumerable(rest, "d");
verifyWritable(rest, "d");
verifyConfigurable(rest, "d");
verifyEnumerable(rest, "e");
verifyWritable(rest, "e");
verifyConfigurable(rest, "e");

View File

@ -1,24 +0,0 @@
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Rest object contains just soruce object's own properties
template: default
esid: pending
includes: [propertyHelper.js]
features: [object-rest]
---*/
//- setup
var o = Object.create({ x: 1, y: 2 });
o.z = 3;
//- elems
{ x, ...{y , z} }
//- vals
o
//- body
assert.sameValue(x, 1);
assert.sameValue(y, undefined);
assert.sameValue(z, 3);