Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
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.2/S11.11.2_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 ((true || false) !== true) { |
michael@0 | 13 | $ERROR('#1: (true || false) === true'); |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | //CHECK#2 |
michael@0 | 17 | if ((false || true) !== true) { |
michael@0 | 18 | $ERROR('#2: (false || true) === true'); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | //CHECK#3 |
michael@0 | 22 | var x = new Boolean(false); |
michael@0 | 23 | if ((x || true) !== x) { |
michael@0 | 24 | $ERROR('#3: var x = Boolean(false); (x || true) === x'); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | //CHECK#4 |
michael@0 | 28 | var y = new Boolean(true); |
michael@0 | 29 | if ((false || y) !== y) { |
michael@0 | 30 | $ERROR('#4: var y = Boolean(true); (false || y) === y'); |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | //CHECK#5 |
michael@0 | 34 | var x = new Boolean(false); |
michael@0 | 35 | var y = new Boolean(true); |
michael@0 | 36 | if ((x || y) !== x) { |
michael@0 | 37 | $ERROR('#5: var x = new Boolean(false); var y = new Boolean(true); (x || y) === x'); |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | //CHECK#6 |
michael@0 | 41 | var x = false; |
michael@0 | 42 | var y = new Boolean(true); |
michael@0 | 43 | if ((x || y) !== y) { |
michael@0 | 44 | $ERROR('#6: var x = false; var y = new Boolean(true); (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 = false; |
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 = false; 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 = 1.1; |
michael@0 | 60 | objecty.prop = false; |
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 = 1.1; objecty.prop = false; (objectx.prop || objecty.prop) === objectx.prop'); |
michael@0 | 63 | } |
michael@0 | 64 |