| 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 neither x, nor y is a prefix of each other, returned result of strings |
| 7 |
comparison applies a simple lexicographic ordering to the sequences of |
| 8 |
code point value values |
| 9 |
es5id: 11.8.1_A4.12_T2 |
| 10 |
description: x and y are string primitives |
| 11 |
---*/ |
| 12 |
|
| 13 |
//CHECK#1 |
| 14 |
if (("0" < "x") !== true) { |
| 15 |
$ERROR('#1: ("0" < "x") !== true'); |
| 16 |
} |
| 17 |
|
| 18 |
//CHECK#2 |
| 19 |
if (("-" < "0") !== true) { |
| 20 |
$ERROR('#2: ("-" < "0") !== true'); |
| 21 |
} |
| 22 |
|
| 23 |
//CHECK#3 |
| 24 |
if (("." < "0") !== true) { |
| 25 |
$ERROR('#3: ("." < "0") !== true'); |
| 26 |
} |
| 27 |
|
| 28 |
//CHECK#4 |
| 29 |
if (("+" < "-") !== true) { |
| 30 |
$ERROR('#4: ("+" < "-") !== true'); |
| 31 |
} |
| 32 |
|
| 33 |
//CHECK#5 |
| 34 |
if (("-0" < "-1") !== true) { |
| 35 |
$ERROR('#5: ("-0" < "-1") !== true'); |
| 36 |
} |
| 37 |
|
| 38 |
//CHECK#6 |
| 39 |
if (("+1" < "-1") !== true) { |
| 40 |
$ERROR('#6: ("+1" < "-1") !== true'); |
| 41 |
} |
| 42 |
|
| 43 |
//CHECK#7 |
| 44 |
if (("1" < "1e-10") !== true) { |
| 45 |
$ERROR('#7: ("1" < "1e-10") !== true'); |
| 46 |
} |