S11.13.1_A2.1_T1.js (1315B)
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 x = y uses GetValue and PutValue 6 es5id: 11.13.1_A2.1_T1 7 description: Either AssigmentExpression is not Reference or GetBase is not null 8 ---*/ 9 10 //CHECK#1 11 x = 1; 12 if (x !== 1) { 13 throw new Test262Error('#1: x = 1; x === 1. Actual: ' + (x)); 14 } 15 16 //CHECK#2 17 var x = 1; 18 if (x !== 1) { 19 throw new Test262Error('#2: var x = 1; x === 1. Actual: ' + (x)); 20 } 21 22 //CHECK#3 23 y = 1; 24 x = y; 25 if (x !== 1) { 26 throw new Test262Error('#3: y = 1; x = y; x === 1. Actual: ' + (x)); 27 } 28 29 //CHECK#4 30 var y = 1; 31 var x = y; 32 if (x !== 1) { 33 throw new Test262Error('#4: var y = 1; var x = y; x === 1. Actual: ' + (x)); 34 } 35 36 //CHECK#5 37 var objectx = new Object(); 38 var objecty = new Object(); 39 objecty.prop = 1.1; 40 objectx.prop = objecty.prop; 41 if (objectx.prop !== objecty.prop) { 42 throw new Test262Error('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx.prop === objecty.prop. Actual: ' + (objectx.prop)); 43 } else { 44 if (objectx === objecty) { 45 throw new Test262Error('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx !== objecty'); 46 } 47 } 48 49 reportCompare(0, 0);