summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js')
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js54
1 files changed, 30 insertions, 24 deletions
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js
index 39fd992a0..37e838d50 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js
@@ -12,35 +12,41 @@ description: >
[[ParameterMap]] of 'O', test TypeError is thrown when updating
the [[Value]] attribute value of 'P' which is not writable and not
configurable (10.6 [[DefineOwnProperty]] step 4)
-includes:
- - runTestCase.js
- - dataPropertyAttributesAreCorrect.js
+includes: [propertyHelper.js]
---*/
-function testcase() {
- var arg;
+var arg;
- (function fun() {
- arg = arguments;
- }());
+(function fun() {
+ arg = arguments;
+}());
- Object.defineProperty(arg, "0", {
- value: 0,
- writable: false,
- configurable: false
- });
+Object.defineProperty(arg, "0", {
+ value: 0,
+ writable: false,
+ configurable: false
+});
- try {
- Object.defineProperties(arg, {
- "0": {
- value: 10
- }
- });
-
- return false;
- } catch (e) {
- return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false);
+try {
+ Object.defineProperties(arg, {
+ "0": {
+ value: 10
}
+ });
+
+ $ERROR("Expected an exception.");
+} catch (e) {
+ verifyEqualTo(arg, "0", 0);
+
+ verifyNotWritable(arg, "0");
+
+ verifyNotEnumerable(arg, "0");
+
+ verifyNotConfigurable(arg, "0");
+
+ if (!(e instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + e);
}
-runTestCase(testcase);
+
+}