| 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 |
Operator x < y returns ToString(x) < ToString(y), if Type(Primitive(x)) |
| 7 |
is String and Type(Primitive(y)) is String |
| 8 |
es5id: 11.8.1_A3.2_T1.1 |
| 9 |
description: > |
| 10 |
Type(Primitive(x)) and Type(Primitive(y)) vary between primitive |
| 11 |
string and String object |
| 12 |
---*/ |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
if ("1" < "1" !== false) { |
| 16 |
$ERROR('#1: "1" < "1" === false'); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (new String("1") < "1" !== false) { |
| 21 |
$ERROR('#2: new String("1") < "1" === false'); |
| 22 |
} |
| 23 |
|
| 24 |
//CHECK#3 |
| 25 |
if ("1" < new String("1") !== false) { |
| 26 |
$ERROR('#3: "1" < new String("1") === false'); |
| 27 |
} |
| 28 |
|
| 29 |
//CHECK#4 |
| 30 |
if (new String("1") < new String("1") !== false) { |
| 31 |
$ERROR('#4: new String("1") < new String("1") === false'); |
| 32 |
} |
| 33 |
|
| 34 |
//CHECK#5 |
| 35 |
if ("x" < "1" !== false) { |
| 36 |
$ERROR('#5: "x" < "1" === false'); |
| 37 |
} |
| 38 |
|
| 39 |
//CHECK#6 |
| 40 |
if ("1" < "x" !== true) { |
| 41 |
$ERROR('#6: "1" < "x" === true'); |
| 42 |
} |