summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.11_Binary_Logical_Operators/11.11.2_Logical_OR_Operator/S11.11.2_A3_T3.js
blob: aade167c02c5a1d28ef0c04fb18252227b008de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S11.11.2_A3_T3;
* @section: 11.11.2;
* @assertion: If ToBoolean(x) is false, return y;
* @description: Type(x) and Type(y) vary between primitive string and String object;
*/

//CHECK#1
if (("" || "1") !== "1") {
  $ERROR('#1: ("" || "1") === "1"');
}

//CHECK#2
var y = new String("1");
if (("" || y) !== y) {
  $ERROR('#2: (var y = new String("1"); "" || y) === y');
}