js/src/tests/test262/ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

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
michael@0 6 *
michael@0 7 * @path ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js
michael@0 8 * @description Either Type is not Reference or GetBase is not null
michael@0 9 */
michael@0 10
michael@0 11 //CHECK#1
michael@0 12 if ((false && true) !== false) {
michael@0 13 $ERROR('#1: (false && true) === false');
michael@0 14 }
michael@0 15
michael@0 16 //CHECK#2
michael@0 17 if ((true && false) !== false) {
michael@0 18 $ERROR('#2: (true && false) === false');
michael@0 19 }
michael@0 20
michael@0 21 //CHECK#3
michael@0 22 var x = false;
michael@0 23 if ((x && true) !== false) {
michael@0 24 $ERROR('#3: var x = false; (x && true) === false');
michael@0 25 }
michael@0 26
michael@0 27 //CHECK#4
michael@0 28 var y = new Boolean(false);
michael@0 29 if ((true && y) !== y) {
michael@0 30 $ERROR('#4: var y = new Boolean(false); (true && y) === y');
michael@0 31 }
michael@0 32
michael@0 33 //CHECK#5
michael@0 34 var x = false;
michael@0 35 var y = true;
michael@0 36 if ((x && y) !== false) {
michael@0 37 $ERROR('#5: var x = false; var y = true; (x && y) === false');
michael@0 38 }
michael@0 39
michael@0 40 //CHECK#6
michael@0 41 var x = true;
michael@0 42 var y = new Boolean(false);
michael@0 43 if ((x && y) !== y) {
michael@0 44 $ERROR('#6: var x = true; var y = new Boolean(false); (x && y) === y');
michael@0 45 }
michael@0 46
michael@0 47 //CHECK#7
michael@0 48 var objectx = new Object();
michael@0 49 var objecty = new Object();
michael@0 50 objectx.prop = true;
michael@0 51 objecty.prop = 1.1;
michael@0 52 if ((objectx.prop && objecty.prop) !== objecty.prop) {
michael@0 53 $ERROR('#7: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop && objecty.prop) === objecty.prop');
michael@0 54 }
michael@0 55
michael@0 56 //CHECK#8
michael@0 57 var objectx = new Object();
michael@0 58 var objecty = new Object();
michael@0 59 objectx.prop = 0;
michael@0 60 objecty.prop = true;
michael@0 61 if ((objectx.prop && objecty.prop) !== objectx.prop) {
michael@0 62 $ERROR('#8: var objectx = new Object(); var objecty = new Object(); objectx.prop = 0; objecty.prop = true; (objectx.prop && objecty.prop) === objectx.prop');
michael@0 63 }
michael@0 64

mercurial