summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperty/15.2.3.6-4-5.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-4-5.js')
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-5.js51
1 files changed, 28 insertions, 23 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-5.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-5.js
index 1bafed8ad..8ce00687b 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-5.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-5.js
@@ -13,28 +13,33 @@ description: >
data desc
---*/
- function sameDataDescriptorValues(d1, d2) {
- return (d1.value === d2.value &&
- d1.enumerable === d2.enumerable &&
- d1.writable === d2.writable &&
- d1.configurable === d2.configurable);
- }
-
- var o = {};
-
- // create a data valued property with the following attributes:
- // value: 101, enumerable: true, writable: true, configurable: true
- o["foo"] = 101;
-
- // query for, and save, the desc. A subsequent call to defineProperty
- // with the same desc should not disturb the property definition.
- var d1 = Object.getOwnPropertyDescriptor(o, "foo");
-
- // now, redefine the property with the same descriptor
- // the property defintion should not get disturbed.
- var desc = { value: 101, enumerable: true, writable: true, configurable: true };
- Object.defineProperty(o, "foo", desc);
-
- var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+function sameDataDescriptorValues(d1, d2) {
+ return (d1.value === d2.value &&
+ d1.enumerable === d2.enumerable &&
+ d1.writable === d2.writable &&
+ d1.configurable === d2.configurable);
+}
+
+var o = {};
+
+// create a data valued property with the following attributes:
+// value: 101, enumerable: true, writable: true, configurable: true
+o["foo"] = 101;
+
+// query for, and save, the desc. A subsequent call to defineProperty
+// with the same desc should not disturb the property definition.
+var d1 = Object.getOwnPropertyDescriptor(o, "foo");
+
+// now, redefine the property with the same descriptor
+// the property defintion should not get disturbed.
+var desc = {
+ value: 101,
+ enumerable: true,
+ writable: true,
+ configurable: true
+};
+Object.defineProperty(o, "foo", desc);
+
+var d2 = Object.getOwnPropertyDescriptor(o, "foo");
assert.sameValue(sameDataDescriptorValues(d1, d2), true, 'sameDataDescriptorValues(d1, d2)');