summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/defineProperty/15.2.3.6-3-10.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-3-10.js')
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-10.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-10.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-10.js
index d8ac440cf..aa3bc8ca8 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-10.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-10.js
@@ -10,24 +10,14 @@ es5id: 15.2.3.6-3-10
description: >
Object.defineProperty throws TypeError if setter is not callable
but not undefined (Number)(8.10.5 step 8.b)
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = {};
// dummy setter
var setter = 42;
var desc = { set: setter };
-
- try {
+assert.throws(TypeError, function() {
Object.defineProperty(o, "foo", desc);
- }
- catch (e) {
- if (e instanceof TypeError &&
- (o.hasOwnProperty("foo") === false)) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+});
+assert.sameValue(o.hasOwnProperty("foo"), false, 'o.hasOwnProperty("foo")');