11.1.5_7-3-1.js (740B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 Refer 11.1.5; 7 The production 8 PropertyAssignment : set PropertyName( PropertySetParameterList ) { FunctionBody } 9 3.Let desc be the Property Descriptor{[[Set]]: closure, [[Enumerable]]: true, [[Configurable]]: true} 10 es5id: 11.1.5_7-3-1 11 description: Object literal - property descriptor for set property assignment 12 ---*/ 13 14 var o; 15 eval("o = {set foo(arg){return 1;}};"); 16 var desc = Object.getOwnPropertyDescriptor(o,"foo"); 17 18 assert.sameValue(desc.enumerable, true, 'desc.enumerable'); 19 assert.sameValue(desc.configurable, true, 'desc.configurable'); 20 21 reportCompare(0, 0);