diff options
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js')
-rw-r--r-- | test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js index 2fac9a50e..1174d8797 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js @@ -13,33 +13,34 @@ description: > are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an accessor property (8.12.9 step 8) -includes: - - runTestCase.js - - accessorPropertyAttributesAreCorrect.js +includes: [propertyHelper.js] ---*/ -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, false); - } -runTestCase(testcase); + +var obj = {}; +obj.verifySetFunction = "data"; +var get_func = function () { + return obj.verifySetFunction; +}; +var set_func = function (value) { + obj.verifySetFunction = value; +}; +Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true +}); + +Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: false +}); + +verifyEqualTo(obj, "foo", get_func()); + +verifyWritable(obj, "foo", "verifySetFunction"); + +verifyNotEnumerable(obj, "foo"); + +verifyNotConfigurable(obj, "foo"); |