diff options
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-4-3.js')
-rw-r--r-- | test/built-ins/Object/defineProperty/15.2.3.6-4-3.js | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-3.js index ffbfc155b..a3873b1e0 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-3.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-3.js @@ -10,10 +10,8 @@ es5id: 15.2.3.6-4-3 description: > Object.defineProperty sets missing attributes to their default values (accessor)(8.12.9 step 4.b.i) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; var getter = function () { return 1; }; @@ -23,11 +21,8 @@ function testcase() { var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); - if (typeof(propDesc.get) === "function" && // the getter must be the function that was provided - propDesc.get === getter && - propDesc.enumerable === false && // false by default - propDesc.configurable === false) { // false by default - return true; - } - } -runTestCase(testcase); +assert.sameValue(typeof(propDesc.get), "function", 'typeof(propDesc.get)'); +assert.sameValue(propDesc.get, getter, 'propDesc.get'); // the getter must be the function that was provided +assert.sameValue(propDesc.set, undefined, 'propDesc.set'); // undefined by default +assert.sameValue(propDesc.enumerable, false, 'propDesc.enumerable'); // false by default +assert.sameValue(propDesc.configurable, false, 'propDesc.configurable'); // false by default
\ No newline at end of file |