S11.2.1_A2.js (898B)
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: MemberExpression and CallExpression uses GetValue 6 es5id: 11.2.1_A2 7 description: > 8 If GetBase(MemberExpression or CallExpression) is null, throw 9 ReferenceError 10 ---*/ 11 12 //CHECK#1 13 try { 14 object[1]; 15 throw new Test262Error('#1.1: object[1] throw ReferenceError. Actual: ' + (object[1])); 16 } 17 catch (e) { 18 if ((e instanceof ReferenceError) !== true) { 19 throw new Test262Error('#1.2: object[1] throw ReferenceError. Actual: ' + (e)); 20 } 21 } 22 23 //CHECK#2 24 try { 25 object.prop; 26 throw new Test262Error('#2.1: object.prop throw ReferenceError. Actual: ' + (object.prop)); 27 } 28 catch (e) { 29 if ((e instanceof ReferenceError) !== true) { 30 throw new Test262Error('#2.2: object.prop throw ReferenceError. Actual: ' + (e)); 31 } 32 } 33 34 reportCompare(0, 0);