Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/less-than/S11.8.1_A4.12_T1.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 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_T1
10 description: x and y are string primitives
11 ---*/
12
13 //CHECK#1
14 if (("xx" < "xy") !== true) {
15 $ERROR('#1: ("xx" < "xy") === true');
16 }
17
18 //CHECK#2
19 if (("xy" < "xx") !== false) {
20 $ERROR('#2: ("xy" < "xx") === false');
21 }
22
23 //CHECK#3
24 if (("x" < "y") !== true) {
25 $ERROR('#3: ("x" < y") === true');
26 }
27
28 //CHECK#4
29 if (("aab" < "aba") !== true) {
30 $ERROR('#4: ("aab" < aba") === true');
31 }
32
33 //CHECK#5
34 if (("\u0061\u0061\u0061\u0062" < "\u0061\u0061\u0061\u0061") !== false) {
35 $ERROR('#5: ("\\u0061\\u0061\\u0061\\u0062" < \\u0061\\u0061\\u0061\\u0061") === false');
36 }
37
38 //CHECK#6
39 if (("a\u0000a" < "a\u0000b") !== true) {
40 $ERROR('#6: ("a\\u0000a" < "a\\u0000b") === true');
41 }
42
43 //CHECK#7
44 if (("aB" < "aa") !== true) {
45 $ERROR('#7: ("aB" < aa") === true');
46 }