tor-browser

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

S11.7.1_A5.1_T1.js (1774B)


      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: Operator x << y uses ToInt32(ShiftExpression)
      6 es5id: 11.7.1_A5.1_T1
      7 description: Checking boundary points
      8 ---*/
      9 
     10 //CHECK#1
     11 if (2147483648.1 << 0 !== -2147483648) { 
     12  throw new Test262Error('#1: 2147483648.1 << 0 === -2147483648. Actual: ' + (2147483648.1 << 0)); 
     13 } 
     14 
     15 //CHECK#2
     16 if (4294967296.1 << 0 !== 0) { 
     17  throw new Test262Error('#2: 4294967296.1 << 0 === 0. Actual: ' + (4294967296.1 << 0)); 
     18 } 
     19 
     20 //CHECK#3
     21 if (6442450944.1 << 0 !== -2147483648) { 
     22  throw new Test262Error('#3: 6442450944.1 << 0 === -2147483648. Actual: ' + (6442450944.1 << 0)); 
     23 } 
     24 
     25 //CHECK#4
     26 if (4294967295.1 << 0 !== -1) { 
     27  throw new Test262Error('#4: 4294967295.1 << 0 === -1. Actual: ' + (4294967295.1 << 0)); 
     28 } 
     29 
     30 //CHECK#5
     31 if (6442450943.1 << 0 !== 2147483647) { 
     32  throw new Test262Error('#5: 6442450943.1 << 0 === 2147483647. Actual: ' + (6442450943.1 << 0)); 
     33 } 
     34 
     35 //CHECK#6
     36 if (-2147483649.1 << 0 !== 2147483647) { 
     37  throw new Test262Error('#6: -2147483649.1 << 0 === 2147483647. Actual: ' + (-2147483649.1 << 0)); 
     38 } 
     39 
     40 //CHECK#7
     41 if (-4294967297.1 << 0 !== -1) { 
     42  throw new Test262Error('#7: -4294967297.1 << 0 === -1. Actual: ' + (-4294967297.1 << 0)); 
     43 } 
     44 
     45 //CHECK#8
     46 if (-6442450945.1 << 0 !== 2147483647) { 
     47  throw new Test262Error('#8: -6442450945.1 << 0 === 2147483647. Actual: ' + (-6442450945.1 << 0)); 
     48 } 
     49 
     50 //CHECK#9
     51 if (-4294967296.1 << 0 !== 0) { 
     52  throw new Test262Error('#9: -4294967296.1 << 0 === 0 . Actual: ' + (-4294967296.1 << 0)); 
     53 } 
     54 
     55 //CHECK#10
     56 if (-6442450944.1 << 0 !== -2147483648) { 
     57  throw new Test262Error('#10: -6442450944.1 << 0 === -2147483648. Actual: ' + (-6442450944.1 << 0)); 
     58 }
     59 
     60 reportCompare(0, 0);