11.1.5_6-3-1.js (713B)
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 : get PropertyName ( ) { FunctionBody } 9 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} 10 es5id: 11.1.5_6-3-1 11 description: Object literal - property descriptor for get property assignment 12 ---*/ 13 14 var o; 15 eval("o = {get foo(){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);