diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-32.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-32.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-32.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-32.js new file mode 100644 index 0000000000..f87162d8b9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-32.js @@ -0,0 +1,31 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.7-6-a-32 +description: > + Object.defineProperties - 'desc' is generic descriptor without any + attribute, test 'P' is defined in 'obj' with all default attribute + values (8.12.9 step 4.a.i) +---*/ + +var obj = {}; + +Object.defineProperties(obj, { + prop: {} +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + +assert(desc.hasOwnProperty("value"), 'desc.hasOwnProperty("value") !== true'); +assert.sameValue(typeof desc.value, "undefined", 'typeof desc.value'); +assert(desc.hasOwnProperty("writable"), 'desc.hasOwnProperty("writable") !== true'); +assert.sameValue(desc.writable, false, 'desc.writable'); +assert(desc.hasOwnProperty("configurable"), 'desc.hasOwnProperty("configurable") !== true'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert(desc.hasOwnProperty("enumerable"), 'desc.hasOwnProperty("enumerable") !== true'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.hasOwnProperty("get"), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty("set"), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); |