summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js')
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js50
1 files changed, 28 insertions, 22 deletions
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js
index dd84a5faa..baace58ec 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js
@@ -10,29 +10,35 @@ description: >
Object.defineProperties - 'O' is a Function object which
implements its own [[GetOwnProperty]] method to get 'P' (8.12.9
step 1 )
-includes:
- - runTestCase.js
- - dataPropertyAttributesAreCorrect.js
+includes: [propertyHelper.js]
---*/
-function testcase() {
- var fun = function () { };
-
- Object.defineProperty(fun, "prop", {
- value: 11,
- configurable: false
- });
-
- try {
- Object.defineProperties(fun, {
- prop: {
- value: 12,
- configurable: true
- }
- });
- return false;
- } catch (e) {
- return e instanceof TypeError && dataPropertyAttributesAreCorrect(fun, "prop", 11, false, false, false);
+var fun = function () { };
+
+Object.defineProperty(fun, "prop", {
+ value: 11,
+ configurable: false
+});
+
+try {
+ Object.defineProperties(fun, {
+ prop: {
+ value: 12,
+ configurable: true
}
+ });
+ $ERROR("Expected an exception.");
+} catch (e) {
+ verifyEqualTo(fun, "prop", 11);
+
+ verifyNotWritable(fun, "prop");
+
+ verifyNotEnumerable(fun, "prop");
+
+ verifyNotConfigurable(fun, "prop");
+
+ if (!(e instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + e);
}
-runTestCase(testcase);
+
+}