S11.8.7_A2.1_T1.js (843B)
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: Operator "in" uses GetValue 6 es5id: 11.8.7_A2.1_T1 7 description: Either Expression is not Reference or GetBase is not null 8 ---*/ 9 10 //CHECK#1 11 if ("MAX_VALUE" in Number !== true) { 12 throw new Test262Error('#1: "MAX_VALUE" in Number === true'); 13 } 14 15 //CHECK#2 16 var x = "MAX_VALUE"; 17 if (x in Number !== true) { 18 throw new Test262Error('#2: var x = "MAX_VALUE"; x in Number === true'); 19 } 20 21 //CHECK#3 22 var y = Number; 23 if ("MAX_VALUE" in y !== true) { 24 throw new Test262Error('#3: var y = Number; "MAX_VALUE" in y === true'); 25 } 26 27 //CHECK#4 28 var x = "MAX_VALUE"; 29 var y = Number; 30 if (x in y !== true) { 31 throw new Test262Error('#4: var x = "MAX_VALUE"; var y = Number; x in y === true'); 32 } 33 34 reportCompare(0, 0);