Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/bitwise-not/S9.5_A2.1_T2.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: ToInt32 returns values between -2^31 and 2^31-1
6 es5id: 9.5_A2.1_T2
7 description: >
8 Converting some numbers, which are in\outside of Int32 scopes,
9 with ~ operator
10 ---*/
11
12 // CHECK#1
13 if (~-2147483649 !== ~2147483647) {
14 $ERROR('#1: ~-2147483649 === ~2147483647');
15 }
16
17 // CHECK#2
18 if (~-4294967296 !== ~0) {
19 $ERROR('#2: ~-4294967296 === ~0');
20 }
21
22 // CHECK#3
23 if (~2147483648 !== ~-2147483648) {
24 $ERROR('#3: ~2147483648 === ~-2147483648');
25 }
26
27 // CHECK#4
28 if (~4294967296 !== ~0) {
29 $ERROR('#4: ~4294967296 === ~0');
30 }