Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/less-than/S11.8.1_A3.1_T1.1.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: |
6 If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String,
7 then operator x < y returns ToNumber(x) < ToNumber(y)
8 es5id: 11.8.1_A3.1_T1.1
9 description: >
10 Type(Primitive(x)) and Type(Primitive(y)) vary between primitive
11 boolean and Boolean object
12 ---*/
13
14 //CHECK#1
15 if (true < true !== false) {
16 $ERROR('#1: true < true === false');
17 }
18
19 //CHECK#2
20 if (new Boolean(true) < true !== false) {
21 $ERROR('#2: new Boolean(true) < true === false');
22 }
23
24 //CHECK#3
25 if (true < new Boolean(true) !== false) {
26 $ERROR('#3: true < new Boolean(true) === false');
27 }
28
29 //CHECK#4
30 if (new Boolean(true) < new Boolean(true) !== false) {
31 $ERROR('#4: new Boolean(true) < new Boolean(true) === false');
32 }