Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * Operator x = y uses GetValue and PutValue |
michael@0 | 6 | * |
michael@0 | 7 | * @path ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js |
michael@0 | 8 | * @description Either AssigmentExpression is not Reference or GetBase is not null |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | //CHECK#1 |
michael@0 | 12 | x = 1; |
michael@0 | 13 | if (x !== 1) { |
michael@0 | 14 | $ERROR('#1: x = 1; x === 1. Actual: ' + (x)); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | //CHECK#2 |
michael@0 | 18 | var x = 1; |
michael@0 | 19 | if (x !== 1) { |
michael@0 | 20 | $ERROR('#2: var x = 1; x === 1. Actual: ' + (x)); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | //CHECK#3 |
michael@0 | 24 | y = 1; |
michael@0 | 25 | x = y; |
michael@0 | 26 | if (x !== 1) { |
michael@0 | 27 | $ERROR('#3: y = 1; x = y; x === 1. Actual: ' + (x)); |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | //CHECK#4 |
michael@0 | 31 | var y = 1; |
michael@0 | 32 | var x = y; |
michael@0 | 33 | if (x !== 1) { |
michael@0 | 34 | $ERROR('#4: var y = 1; var x = y; x === 1. Actual: ' + (x)); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | //CHECK#5 |
michael@0 | 38 | var objectx = new Object(); |
michael@0 | 39 | var objecty = new Object(); |
michael@0 | 40 | objecty.prop = 1.1; |
michael@0 | 41 | objectx.prop = objecty.prop; |
michael@0 | 42 | if (objectx.prop !== objecty.prop) { |
michael@0 | 43 | $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx.prop === objecty.prop. Actual: ' + (objectx.prop)); |
michael@0 | 44 | } else { |
michael@0 | 45 | if (objectx === objecty) { |
michael@0 | 46 | $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx !== objecty'); |
michael@0 | 47 | } |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 |