summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js')
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js52
1 files changed, 29 insertions, 23 deletions
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js
index 34fe3b6c5..34c416b75 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js
@@ -10,30 +10,36 @@ description: >
Object.defineProperties throws TypeError when P.configurable is
false, P.writalbe is false, properties.value is +0 and P.value is
-0 (8.12.9 step 10.a.ii.1)
-includes:
- - runTestCase.js
- - dataPropertyAttributesAreCorrect.js
+includes: [propertyHelper.js]
---*/
-function testcase() {
-
- var obj = {};
-
- Object.defineProperty(obj, "foo", {
- value: +0,
- writable: false,
- configurable: false
- });
-
- try {
- Object.defineProperties(obj, {
- foo: {
- value: -0
- }
- });
- return false;
- } catch (e) {
- return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false);
+
+var obj = {};
+
+Object.defineProperty(obj, "foo", {
+ value: +0,
+ writable: false,
+ configurable: false
+});
+
+try {
+ Object.defineProperties(obj, {
+ foo: {
+ value: -0
}
+ });
+ $ERROR("Expected an exception.");
+} catch (e) {
+ verifyEqualTo(obj, "foo", +0);
+
+ verifyNotWritable(obj, "foo");
+
+ verifyNotEnumerable(obj, "foo");
+
+ verifyNotConfigurable(obj, "foo");
+
+ if (!(e instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + e);
}
-runTestCase(testcase);
+
+}