11.1.5_5-4-1.js (809B)
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 : PropertyName : AssignmentExpression 9 4.Let desc be the Property Descriptor{[[Value]]: propValue, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true} 10 es5id: 11.1.5_5-4-1 11 description: Object literal - property descriptor for assignment expression 12 ---*/ 13 14 var o = {foo : 1}; 15 var desc = Object.getOwnPropertyDescriptor(o,"foo"); 16 17 assert.sameValue(desc.value, 1, 'desc.value'); 18 assert.sameValue(desc.writable, true, 'desc.writable'); 19 assert.sameValue(desc.enumerable, true, 'desc.enumerable'); 20 assert.sameValue(desc.configurable, true, 'desc.configurable'); 21 22 reportCompare(0, 0);