tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S11.8.2_A4.10.js (923B)


      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 x is a prefix of y, return false
      6 es5id: 11.8.2_A4.10
      7 description: x and y are string primitives
      8 ---*/
      9 
     10 //CHECK#1
     11 if (("x" > "x") !== false) {
     12  throw new Test262Error('#1: ("x" > "x") === false');
     13 }
     14 
     15 //CHECK#2
     16 if (("" > "x") !== false) {
     17  throw new Test262Error('#2: ("" > "x") === false');
     18 }
     19 
     20 //CHECK#3
     21 if (("ab" > "abcd") !== false) {
     22  throw new Test262Error('#3: ("ab" > abcd") === false');
     23 }
     24 
     25 //CHECK#4
     26 if (("abcd" > "abc\u0064") !== false) {
     27  throw new Test262Error('#4: ("abcd" > abc\\u0064") === false');
     28 }
     29 
     30 //CHECK#5
     31 if (("x" > "x" + "y") !== false) {
     32  throw new Test262Error('#5: ("x" > "x" + "y") === false');
     33 }
     34 
     35 //CHECK#6
     36 var x = "x";
     37 if ((x > x + "y") !== false) {
     38  throw new Test262Error('#6: var x = "x"; (x > x + "y") === false');
     39 }
     40 
     41 reportCompare(0, 0);