S8.12.3_A2.js (1050B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 [[Get]](P) method should return undefined when property P does not exist 7 both in instance and prototype 8 es5id: 8.12.3_A2 9 description: > 10 Try to get P when property P does not exist both in instance and 11 prototype 12 ---*/ 13 14 var __obj={}; 15 16 ////////////////////////////////////////////////////////////////////////////// 17 //CHECK#1 18 if (__obj.propFoo !== undefined){ 19 throw new Test262Error('#1: var __obj={}; __obj.propFoo === undefined. Actual: ' + (__obj.propFoo)); 20 } 21 // 22 ////////////////////////////////////////////////////////////////////////////// 23 24 ////////////////////////////////////////////////////////////////////////////// 25 //CHECK#2 26 if (__obj['propFoo'] !== undefined){ 27 throw new Test262Error('#2: var __obj={}; __obj[\'propFoo\'] === undefined. Actual: ' + (__obj['propFoo'])); 28 } 29 // 30 ////////////////////////////////////////////////////////////////////////////// 31 32 reportCompare(0, 0);