Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/less-than-or-equal/S11.8.3_A4.10.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: If y is a prefix of x and x !== y, return false
6 es5id: 11.8.3_A4.10
7 description: x and y are string primitives
8 ---*/
9
10 //CHECK#1
11 if (("x " <= "x") !== false) {
12 $ERROR('#1: ("x " <= "x") === false');
13 }
14
15 //CHECK#2
16 if (("x" <= "") !== false) {
17 $ERROR('#2: ("x" <= "") === false');
18 }
19
20 //CHECK#3
21 if (("abcd" <= "ab") !== false) {
22 $ERROR('#3: ("abcd" <= ab") === false');
23 }
24
25 //CHECK#4
26 if (("abc\u0064" <= "abcd") !== true) {
27 $ERROR('#4: ("abc\\u0064" <= abcd") === true');
28 }
29
30 //CHECK#5
31 if (("x" + "y" <= "x") !== false) {
32 $ERROR('#5: ("x" + "y" <= "x") === false');
33 }
34
35 //CHECK#6
36 var x = "x";
37 if ((x + 'y' <= x) !== false) {
38 $ERROR('#6: var x = "x"; (x + "y" <= x) === false');
39 }