summaryrefslogtreecommitdiff
path: root/src/spread
diff options
context:
space:
mode:
authorCaio Lima <ticaiolima@gmail.com>2017-03-13 14:21:26 +0000
committerLeo Balter <leonardo.balter@gmail.com>2017-03-13 10:21:26 -0400
commit16e66ece0cd8bc8118e0f5a6816f3aaa54e0aa6d (patch)
treece65fb46e5acf4d8e443ef95879b724d329fc39e /src/spread
parent471bde916274204b7d97d8080cf1c8a7e38cf0e9 (diff)
downloadqtdeclarative-testsuites-16e66ece0cd8bc8118e0f5a6816f3aaa54e0aa6d.tar.gz
Initial set for Object Spread feature (#890)
Diffstat (limited to 'src/spread')
-rw-r--r--src/spread/mult-err-obj-getter-throws.case23
-rw-r--r--src/spread/mult-err-obj-unresolvable.case23
-rw-r--r--src/spread/mult-obj-base.case39
-rw-r--r--src/spread/mult-obj-empty.case27
-rw-r--r--src/spread/mult-obj-ident.case49
-rw-r--r--src/spread/mult-obj-null-empty-undefined.case30
-rw-r--r--src/spread/mult-obj-null.case27
-rw-r--r--src/spread/mult-obj-undefined.case27
-rw-r--r--src/spread/obj-getter-descriptor.case41
-rw-r--r--src/spread/obj-getter-init.case22
-rw-r--r--src/spread/obj-manipulate-outter-obj-in-getter.case36
-rw-r--r--src/spread/obj-mult-spread-getter.case36
-rw-r--r--src/spread/obj-mult-spread.case34
-rw-r--r--src/spread/obj-null.case25
-rw-r--r--src/spread/obj-override-immutable.case30
-rw-r--r--src/spread/obj-overrides-prev-properties.case32
-rw-r--r--src/spread/obj-setter-redef.case19
-rw-r--r--src/spread/obj-skip-non-enumerable.case20
-rw-r--r--src/spread/obj-spread-order.case33
-rw-r--r--src/spread/obj-symbol-property.case34
-rw-r--r--src/spread/obj-undefined.case25
-rw-r--r--src/spread/obj-with-overrides.case38
-rw-r--r--src/spread/sngl-err-obj-getter-throws.case23
-rw-r--r--src/spread/sngl-err-obj-unresolvable.case23
-rw-r--r--src/spread/sngl-obj-base.case36
-rw-r--r--src/spread/sngl-obj-empty.case25
-rw-r--r--src/spread/sngl-obj-ident.case39
27 files changed, 816 insertions, 0 deletions
diff --git a/src/spread/mult-err-obj-getter-throws.case b/src/spread/mult-err-obj-getter-throws.case
new file mode 100644
index 000000000..4c6e259e3
--- /dev/null
+++ b/src/spread/mult-err-obj-getter-throws.case
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator results in error when there is an getter that throws an exception
+template: Error
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- error
+Test262Error
+//- args
+{a: 1, ...{ get foo() { throw new Test262Error(); } }}
diff --git a/src/spread/mult-err-obj-unresolvable.case b/src/spread/mult-err-obj-unresolvable.case
new file mode 100644
index 000000000..fce8cf0e9
--- /dev/null
+++ b/src/spread/mult-err-obj-unresolvable.case
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator results in error when using an unresolvable reference
+template: error
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- error
+ReferenceError
+//- args
+{a: 0, ...unresolvableReference}
diff --git a/src/spread/mult-obj-base.case b/src/spread/mult-obj-base.case
new file mode 100644
index 000000000..46b07525d
--- /dev/null
+++ b/src/spread/mult-obj-base.case
@@ -0,0 +1,39 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other arguments
+template: default
+esid: pending
+includes: [propertyHelper.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{a: 1, b: 2, ...{c: 3, d: 4}}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(obj.c, 3);
+assert.sameValue(obj.d, 4);
+assert.sameValue(Object.keys(obj).length, 4);
+
+verifyEnumerable(obj, "c");
+verifyWritable(obj, "c");
+verifyConfigurable(obj, "c");
+
+verifyEnumerable(obj, "d");
+verifyWritable(obj, "d");
+verifyConfigurable(obj, "d");
+
diff --git a/src/spread/mult-obj-empty.case b/src/spread/mult-obj-empty.case
new file mode 100644
index 000000000..9e3ae8f41
--- /dev/null
+++ b/src/spread/mult-obj-empty.case
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other arguments with empty object
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{a: 1, b: 2, ...{}}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(Object.keys(obj).length, 2);
diff --git a/src/spread/mult-obj-ident.case b/src/spread/mult-obj-ident.case
new file mode 100644
index 000000000..a5af7dbb5
--- /dev/null
+++ b/src/spread/mult-obj-ident.case
@@ -0,0 +1,49 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other properties
+template: default
+esid: pending
+includes: [propertyHelper.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let o = {c: 3, d: 4};
+
+//- args
+{a: 1, b: 2, ...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(obj.c, 3);
+assert.sameValue(obj.d, 4);
+assert.sameValue(Object.keys(obj).length, 4);
+
+verifyEnumerable(obj, "a");
+verifyWritable(obj, "a");
+verifyConfigurable(obj, "a");
+
+verifyEnumerable(obj, "b");
+verifyWritable(obj, "b");
+verifyConfigurable(obj, "b");
+
+verifyEnumerable(obj, "c");
+verifyWritable(obj, "c");
+verifyConfigurable(obj, "c");
+
+verifyEnumerable(obj, "d");
+verifyWritable(obj, "d");
+verifyConfigurable(obj, "d");
diff --git a/src/spread/mult-obj-null-empty-undefined.case b/src/spread/mult-obj-null-empty-undefined.case
new file mode 100644
index 000000000..6af89493c
--- /dev/null
+++ b/src/spread/mult-obj-null-empty-undefined.case
@@ -0,0 +1,30 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other arguments with null, undefined and empty object
+template: default
+esid: pending
+includes: [compareArray.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(obj.c, 3);
+assert.sameValue(obj.d, 4);
+assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"]));
diff --git a/src/spread/mult-obj-null.case b/src/spread/mult-obj-null.case
new file mode 100644
index 000000000..88917a6a0
--- /dev/null
+++ b/src/spread/mult-obj-null.case
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other arguments with null value
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{a: 1, b: 2, ...null}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(Object.keys(obj).length, 2);
diff --git a/src/spread/mult-obj-undefined.case b/src/spread/mult-obj-undefined.case
new file mode 100644
index 000000000..83be9ff65
--- /dev/null
+++ b/src/spread/mult-obj-undefined.case
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator following other arguments with undefined
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{a: 1, b: 2, ...undefined}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 2);
+assert.sameValue(Object.keys(obj).length, 2);
diff --git a/src/spread/obj-getter-descriptor.case b/src/spread/obj-getter-descriptor.case
new file mode 100644
index 000000000..83032faf1
--- /dev/null
+++ b/src/spread/obj-getter-descriptor.case
@@ -0,0 +1,41 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Spread operation with getter results in data property descriptor
+template: default
+esid: pending
+includes: [propertyHelper.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let o = {
+ get a() {
+ return 42;
+ }
+};
+
+//- args
+{...o, c: 4, d: 5}
+//- params
+obj
+//- body
+
+assert.sameValue(Object.getOwnPropertyDescriptor(obj, "a").value, 42);
+assert.sameValue(obj.c, 4);
+assert.sameValue(obj.d, 5);
+assert.sameValue(Object.keys(obj).length, 3);
+
+verifyEnumerable(obj, "a");
+verifyWritable(obj, "a");
+verifyConfigurable(obj, "a");
diff --git a/src/spread/obj-getter-init.case b/src/spread/obj-getter-init.case
new file mode 100644
index 000000000..57d8df172
--- /dev/null
+++ b/src/spread/obj-getter-init.case
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Getter in object literal is not evaluated
+template: default
+esid: pending
+---*/
+
+//- setup
+
+let o = {a: 2, b: 3};
+let executedGetter = false;
+
+//- args
+{...o, get c() { executedGetter = true; }}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 2);
+assert.sameValue(obj.b, 3);
+assert.sameValue(executedGetter, false)
+assert.sameValue(Object.keys(obj).length, 3);
diff --git a/src/spread/obj-manipulate-outter-obj-in-getter.case b/src/spread/obj-manipulate-outter-obj-in-getter.case
new file mode 100644
index 000000000..1411eda28
--- /dev/null
+++ b/src/spread/obj-manipulate-outter-obj-in-getter.case
@@ -0,0 +1,36 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Getter manipulates outter object before it's spread operation
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+var o = { a: 0, b: 1 };
+var cthulhu = { get x() {
+ delete o.a;
+ o.b = 42;
+ o.c = "ni";
+}};
+//- args
+{...cthulhu, ...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.hasOwnProperty("a"), false);
+assert.sameValue(obj.b, 42);
+assert.sameValue(obj.c, "ni");
+assert(obj.hasOwnProperty("x"));
+assert.sameValue(Object.keys(obj).length, 3);
diff --git a/src/spread/obj-mult-spread-getter.case b/src/spread/obj-mult-spread-getter.case
new file mode 100644
index 000000000..5f50909dc
--- /dev/null
+++ b/src/spread/obj-mult-spread-getter.case
@@ -0,0 +1,36 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Multiple Object Spread usage calls getter multiple times
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let getterCallCount = 0;
+let o = {
+ get a() {
+ return ++getterCallCount;
+ }
+};
+
+//- args
+{...o, c: 4, d: 5, a: 42, ...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 2);
+assert.sameValue(obj.c, 4);
+assert.sameValue(obj.d, 5);
+assert.sameValue(Object.keys(obj).length, 3);
diff --git a/src/spread/obj-mult-spread.case b/src/spread/obj-mult-spread.case
new file mode 100644
index 000000000..61cac2243
--- /dev/null
+++ b/src/spread/obj-mult-spread.case
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Multiple Object Spread operation
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+
+let o = {a: 2, b: 3};
+let o2 = {c: 4, d: 5};
+
+//- args
+{...o, ...o2}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 2);
+assert.sameValue(obj.b, 3);
+assert.sameValue(obj.c, 4);
+assert.sameValue(obj.d, 5);
+assert.sameValue(Object.keys(obj).length, 4);
diff --git a/src/spread/obj-null.case b/src/spread/obj-null.case
new file mode 100644
index 000000000..6c9af0a62
--- /dev/null
+++ b/src/spread/obj-null.case
@@ -0,0 +1,25 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Null Object Spread is ignored
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{...null}
+//- params
+obj
+//- body
+assert.sameValue(Object.keys(obj).length, 0);
diff --git a/src/spread/obj-override-immutable.case b/src/spread/obj-override-immutable.case
new file mode 100644
index 000000000..8e405c415
--- /dev/null
+++ b/src/spread/obj-override-immutable.case
@@ -0,0 +1,30 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread overriding immutable properties
+template: default
+esid: pending
+includes: [propertyHelper.js]
+---*/
+
+//- setup
+
+let o = {b: 2};
+Object.defineProperty(o, "a", {value: 1, enumerable: true, writable: false, configurable: true});
+
+//- args
+{...o, a: 3}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 3)
+assert.sameValue(obj.b, 2);
+
+verifyEnumerable(obj, "a");
+verifyWritable(obj, "a");
+verifyConfigurable(obj, "a");
+
+verifyEnumerable(obj, "b");
+verifyWritable(obj, "b");
+verifyConfigurable(obj, "b");
+
diff --git a/src/spread/obj-overrides-prev-properties.case b/src/spread/obj-overrides-prev-properties.case
new file mode 100644
index 000000000..1b95648b7
--- /dev/null
+++ b/src/spread/obj-overrides-prev-properties.case
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread properties overrides previous definitions
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let o = {a: 2, b: 3};
+
+//- args
+{a: 1, b: 7, ...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 2);
+assert.sameValue(obj.b, 3);
+assert.sameValue(Object.keys(obj).length, 2);
+assert.sameValue(o.a, 2);
+assert.sameValue(o.b, 3);
diff --git a/src/spread/obj-setter-redef.case b/src/spread/obj-setter-redef.case
new file mode 100644
index 000000000..949503dd7
--- /dev/null
+++ b/src/spread/obj-setter-redef.case
@@ -0,0 +1,19 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Setter are not executed when redefined in Object Spread
+template: default
+esid: pending
+---*/
+
+//- setup
+let executedSetter = false;
+
+//- args
+{set c(v) { executedSetter = true; }, ...{c: 1}}
+//- params
+obj
+//- body
+assert.sameValue(obj.c, 1);
+assert.sameValue(executedSetter, false);
+assert.sameValue(Object.keys(obj).length, 1);
diff --git a/src/spread/obj-skip-non-enumerable.case b/src/spread/obj-skip-non-enumerable.case
new file mode 100644
index 000000000..07b72b54e
--- /dev/null
+++ b/src/spread/obj-skip-non-enumerable.case
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread doesn't copy non-enumerable properties
+template: default
+esid: pending
+---*/
+
+//- setup
+
+let o = {};
+Object.defineProperty(o, "b", {value: 3, enumerable: false});
+
+//- args
+{...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.hasOwnProperty("b"), false)
+assert.sameValue(Object.keys(obj).length, 0);
diff --git a/src/spread/obj-spread-order.case b/src/spread/obj-spread-order.case
new file mode 100644
index 000000000..21b86b949
--- /dev/null
+++ b/src/spread/obj-spread-order.case
@@ -0,0 +1,33 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Spread operation follows [[OwnPropertyKeys]] order
+template: default
+esid: pending
+includes: [compareArray.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+var calls = [];
+var o = { get z() { calls.push('z') }, get a() { calls.push('a') } };
+Object.defineProperty(o, 1, { get: () => { calls.push(1) }, enumerable: true });
+Object.defineProperty(o, Symbol('foo'), { get: () => { calls.push("Symbol(foo)") }, enumerable: true });
+
+//- args
+{...o}
+//- params
+obj
+//- body
+assert(compareArray(calls, [1, 'z', 'a', "Symbol(foo)"]));
+assert.sameValue(Object.keys(obj).length, 3);
diff --git a/src/spread/obj-symbol-property.case b/src/spread/obj-symbol-property.case
new file mode 100644
index 000000000..87a986956
--- /dev/null
+++ b/src/spread/obj-symbol-property.case
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Spread operation where source object contains Symbol properties
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let symbol = Symbol('foo');
+let o = {};
+o[symbol] = 1;
+
+//- args
+{...o, c: 4, d: 5}
+//- params
+obj
+//- body
+
+assert.sameValue(obj[symbol], 1);
+assert.sameValue(obj.c, 4);
+assert.sameValue(obj.d, 5);
+assert.sameValue(Object.keys(obj).length, 2);
diff --git a/src/spread/obj-undefined.case b/src/spread/obj-undefined.case
new file mode 100644
index 000000000..09ac2293a
--- /dev/null
+++ b/src/spread/obj-undefined.case
@@ -0,0 +1,25 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Undefined Object Spread is ignored
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{...undefined}
+//- params
+obj
+//- body
+assert.sameValue(Object.keys(obj).length, 0);
diff --git a/src/spread/obj-with-overrides.case b/src/spread/obj-with-overrides.case
new file mode 100644
index 000000000..1e086f692
--- /dev/null
+++ b/src/spread/obj-with-overrides.case
@@ -0,0 +1,38 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread properties being overriden
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let o = {a: 2, b: 3, c: 4, e: undefined, f: null, g: false};
+
+//- args
+{...o, a: 1, b: 7, d: 5, h: -0, i: Symbol("foo"), j: o}
+//- params
+obj
+//- body
+assert.sameValue(obj.a, 1);
+assert.sameValue(obj.b, 7);
+assert.sameValue(obj.c, 4);
+assert.sameValue(obj.d, 5);
+assert(obj.hasOwnProperty("e"));
+assert.sameValue(obj.f, null);
+assert.sameValue(obj.g, false);
+assert.sameValue(obj.h, -0);
+assert.sameValue(obj.i.toString(), "Symbol(foo)");
+assert(Object.is(obj.j, o));
+assert.sameValue(Object.keys(obj).length, 10);
diff --git a/src/spread/sngl-err-obj-getter-throws.case b/src/spread/sngl-err-obj-getter-throws.case
new file mode 100644
index 000000000..4b929215d
--- /dev/null
+++ b/src/spread/sngl-err-obj-getter-throws.case
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator results in error when there is an getter that throws an exception
+template: error
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- error
+Test262Error
+//- args
+{...{ get foo() { throw new Test262Error(); } }}
diff --git a/src/spread/sngl-err-obj-unresolvable.case b/src/spread/sngl-err-obj-unresolvable.case
new file mode 100644
index 000000000..b6976d998
--- /dev/null
+++ b/src/spread/sngl-err-obj-unresolvable.case
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator results in error when using an unresolvable reference
+template: error
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- error
+ReferenceError
+//- args
+{...unresolvableReference}
diff --git a/src/spread/sngl-obj-base.case b/src/spread/sngl-obj-base.case
new file mode 100644
index 000000000..26aeb2fae
--- /dev/null
+++ b/src/spread/sngl-obj-base.case
@@ -0,0 +1,36 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator without other arguments
+template: default
+esid: pending
+includes: [propertyHelper.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{...{c: 3, d: 4}}
+//- params
+obj
+//- body
+assert.sameValue(obj.c, 3);
+assert.sameValue(obj.d, 4);
+assert.sameValue(Object.keys(obj).length, 2);
+
+verifyEnumerable(obj, "c");
+verifyWritable(obj, "c");
+verifyConfigurable(obj, "c");
+
+verifyEnumerable(obj, "d");
+verifyWritable(obj, "d");
+verifyConfigurable(obj, "d");
diff --git a/src/spread/sngl-obj-empty.case b/src/spread/sngl-obj-empty.case
new file mode 100644
index 000000000..19afa8578
--- /dev/null
+++ b/src/spread/sngl-obj-empty.case
@@ -0,0 +1,25 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator on a single empty object
+template: default
+esid: pending
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- args
+{...{}}
+//- params
+obj
+//- body
+assert.sameValue(Object.keys(obj).length, 0);
diff --git a/src/spread/sngl-obj-ident.case b/src/spread/sngl-obj-ident.case
new file mode 100644
index 000000000..b94d0ef16
--- /dev/null
+++ b/src/spread/sngl-obj-ident.case
@@ -0,0 +1,39 @@
+// Copyright (C) 2017 Caio Lima. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+desc: Object Spread operator without other arguments
+template: default
+esid: pending
+includes: [propertyHelper.js]
+info: |
+ Pending Runtime Semantics: PropertyDefinitionEvaluation
+
+ PropertyDefinition:...AssignmentExpression
+
+ 1. Let exprValue be the result of evaluating AssignmentExpression.
+ 2. Let fromValue be GetValue(exprValue).
+ 3. ReturnIfAbrupt(fromValue).
+ 4. Let excludedNames be a new empty List.
+ 5. Return CopyDataProperties(object, fromValue, excludedNames).
+
+---*/
+
+//- setup
+let o = {c: 3, d: 4};
+
+//- args
+{...o}
+//- params
+obj
+//- body
+assert.sameValue(obj.c, 3);
+assert.sameValue(obj.d, 4);
+assert.sameValue(Object.keys(obj).length, 2);
+
+verifyEnumerable(obj, "c");
+verifyWritable(obj, "c");
+verifyConfigurable(obj, "c");
+
+verifyEnumerable(obj, "d");
+verifyWritable(obj, "d");
+verifyConfigurable(obj, "d");