summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-4-239.js')
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-239.js50
1 files changed, 28 insertions, 22 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js
index 5a965d5b3..1b51b2d64 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-239.js
@@ -12,32 +12,38 @@ description: >
attribute value of 'name' is false, and [[Enumerable]] of 'desc'
is present and its value is different from the [[Enumerable]]
attribute value of 'name' (15.4.5.1 step 4.c)
-includes:
- - runTestCase.js
- - dataPropertyAttributesAreCorrect.js
+includes: [propertyHelper.js]
---*/
-function testcase() {
- var arrObj = [];
+var arrObj = [];
- Object.defineProperty(arrObj, "1", {
- value: 3,
- writable: true,
- configurable: false,
- enumerable: false
- });
+Object.defineProperty(arrObj, "1", {
+ value: 3,
+ writable: true,
+ configurable: false,
+ enumerable: false
+});
- try {
- Object.defineProperty(arrObj, "1", {
- value: 13,
- writable: true,
- enumerable: true
- });
- return false;
+try {
+ Object.defineProperty(arrObj, "1", {
+ value: 13,
+ writable: true,
+ enumerable: true
+ });
+ $ERROR("Expected an exception.");
- } catch (e) {
- return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false);
- }
+} catch (e) {
+ verifyEqualTo(arrObj, "1", 3);
+
+ verifyWritable(arrObj, "1");
+
+ verifyNotEnumerable(arrObj, "1");
+
+ verifyNotConfigurable(arrObj, "1");
+
+ if (!(e instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + e);
}
-runTestCase(testcase);
+
+}