Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Operator x + y uses GetValue
6 *
7 * @path ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js
8 * @description Either Type is not Reference or GetBase is not null
9 */
11 //CHECK#1
12 if (1 + 1 !== 2) {
13 $ERROR('#1: 1 + 1 === 2. Actual: ' + (1 + 1));
14 }
16 //CHECK#2
17 var x = 1;
18 if (x + 1 !== 2) {
19 $ERROR('#2: var x = 1; x + 1 === 2. Actual: ' + (x + 1));
20 }
22 //CHECK#3
23 var y = 1;
24 if (1 + y !== 2) {
25 $ERROR('#3: var y = 1; 1 + y === 2. Actual: ' + (1 + y));
26 }
28 //CHECK#4
29 var x = 1;
30 var y = 1;
31 if (x + y !== 2) {
32 $ERROR('#4: var x = 1; var y = 1; x + y === 2. Actual: ' + (x + y));
33 }
35 //CHECK#5
36 var objectx = new Object();
37 var objecty = new Object();
38 objectx.prop = 1;
39 objecty.prop = 1;
40 if (objectx.prop + objecty.prop !== 2) {
41 $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop + objecty.prop === 2. Actual: ' + (objectx.prop + objecty.prop));
42 }