Source code
Revision control
Copy as Markdown
Other Tools
function test1 (x) {↩
assertEq(x | -1, -1);↩
assertEq(-1 | x, -1);↩
assertEq(x & -1, 1);↩
assertEq(-1 & x, 1);↩
assertEq(x ^ -1, -2);↩
assertEq(-1 ^ x, -2);↩
assertEq(x >> -1, 0);↩
assertEq(-1 >> x, -1);↩
assertEq(x >>> -1, 0);↩
assertEq(-1 >>> x, 2147483647);↩
assertEq(x << -1, -2147483648);↩
assertEq(-1 << x, -2);↩
assertEq(x | 1, 1);↩
assertEq(1 | x, 1);↩
assertEq(x & 1, 1);↩
assertEq(1 & x, 1);↩
assertEq(x ^ 1, 0);↩
assertEq(1 ^ x, 0);↩
assertEq(x >> 1, 0);↩
assertEq(1 >> x, 0);↩
assertEq(x >>> 1, 0);↩
assertEq(1 >>> x, 0);↩
assertEq(x << 1, 2);↩
assertEq(1 << x, 2);↩
assertEq(x | 0, 1);↩
assertEq(0 | x, 1);↩
assertEq(x & 0, 0);↩
assertEq(0 & x, 0);↩
assertEq(x ^ 0, 1);↩
assertEq(0 ^ x, 1);↩
assertEq(x >> 0, 1);↩
assertEq(0 >> x, 0);↩
assertEq(x >>> 0, 1);↩
assertEq(0 >>> x, 0);↩
assertEq(x << 0, 1);↩
assertEq(0 << x, 0);↩
assertEq(x | 0xffffffff, -1);↩
assertEq(0xffffffff | x, -1);↩
assertEq(x & 0xffffffff, 1);↩
assertEq(0xffffffff & x, 1);↩
assertEq(x ^ 0xffffffff, -2);↩
assertEq(0xffffffff ^ x, -2);↩
assertEq(x >> 0xffffffff, 0);↩
assertEq(0xffffffff >> x, -1);↩
assertEq(x >>> 0xffffffff, 0);↩
assertEq(0xffffffff >>> x, 2147483647);↩
assertEq(x << 0xffffffff, -2147483648);↩
assertEq(0xffffffff << x, -2);↩
assertEq(x | "10.6", 11);↩
assertEq("10.6" | x, 11);↩
assertEq(x & "10.6", 0);↩
assertEq("10.6" & x, 0);↩
assertEq(x ^ "10.6", 11);↩
assertEq("10.6" ^ x, 11);↩
assertEq(x >> "10.6", 0);↩
assertEq("10.6" >> x, 5);↩
assertEq(x >>> "10.6", 0);↩
assertEq("10.6" >>> x, 5);↩
assertEq(x << "10.6", 1024);↩
assertEq("10.6" << x, 20);↩
assertEq(x | 2147483648, -2147483647);↩
assertEq(2147483648 | x, -2147483647);↩
assertEq(x & 2147483648, 0);↩
assertEq(2147483648 & x, 0);↩
assertEq(x ^ 2147483648, -2147483647);↩
assertEq(2147483648 ^ x, -2147483647);↩
assertEq(x >> 2147483648, 1);↩
assertEq(2147483648 >> x, -1073741824);↩
assertEq(x >>> 2147483648, 1);↩
assertEq(2147483648 >>> x, 1073741824);↩
assertEq(x << 2147483648, 1);↩
assertEq(2147483648 << x, 0);↩
assertEq(x | 4294967296, 1);↩
assertEq(4294967296 | x, 1);↩
assertEq(x & 4294967296, 0);↩
assertEq(4294967296 & x, 0);↩
assertEq(x ^ 4294967296, 1);↩
assertEq(4294967296 ^ x, 1);↩
assertEq(x >> 4294967296, 1);↩
assertEq(4294967296 >> x, 0);↩
assertEq(x >>> 4294967296, 1);↩
assertEq(4294967296 >>> x, 0);↩
assertEq(x << 4294967296, 1);↩
assertEq(4294967296 << x, 0);↩
assertEq(x | undefined, 1);↩
assertEq(undefined | x, 1);↩
assertEq(x & undefined, 0);↩
assertEq(undefined & x, 0);↩
assertEq(x ^ undefined, 1);↩
assertEq(undefined ^ x, 1);↩
assertEq(x >> undefined, 1);↩
assertEq(undefined >> x, 0);↩
assertEq(x >>> undefined, 1);↩
assertEq(undefined >>> x, 0);↩
assertEq(x << undefined, 1);↩
assertEq(undefined << x, 0);↩
assertEq(x | null, 1);↩
assertEq(null | x, 1);↩
assertEq(x & null, 0);↩
assertEq(null & x, 0);↩
assertEq(x ^ null, 1);↩
assertEq(null ^ x, 1);↩
assertEq(x >> null, 1);↩
assertEq(null >> x, 0);↩
assertEq(x >>> null, 1);↩
assertEq(null >>> x, 0);↩
assertEq(x << null, 1);↩
assertEq(null << x, 0);↩
assertEq(x | false, 1);↩
assertEq(false | x, 1);↩
assertEq(x & false, 0);↩
assertEq(false & x, 0);↩
assertEq(x ^ false, 1);↩
assertEq(false ^ x, 1);↩
assertEq(x >> false, 1);↩
assertEq(false >> x, 0);↩
assertEq(x >>> false, 1);↩
assertEq(false >>> x, 0);↩
assertEq(x << false, 1);↩
assertEq(false << x, 0);↩
assertEq(x | true, 1);↩
assertEq(true | x, 1);↩
assertEq(x & true, 1);↩
assertEq(true & x, 1);↩
assertEq(x ^ true, 0);↩
assertEq(true ^ x, 0);↩
assertEq(x >> true, 0);↩
assertEq(true >> x, 0);↩
assertEq(x >>> true, 0);↩
assertEq(true >>> x, 0);↩
assertEq(x << true, 2);↩
assertEq(true << x, 2);↩
assertEq(x | -1.5, -1);↩
assertEq(-1.5 | x, -1);↩
assertEq(x & -1.5, 1);↩
assertEq(-1.5 & x, 1);↩
assertEq(x ^ -1.5, -2);↩
assertEq(-1.5 ^ x, -2);↩
assertEq(x >> -1.5, 0);↩
assertEq(-1.5 >> x, -1);↩
assertEq(x >>> -1.5, 0);↩
assertEq(-1.5 >>> x, 2147483647);↩
assertEq(x << -1.5, -2147483648);↩
assertEq(-1.5 << x, -2);↩
}↩
test1(1)↩
↩
function test2 (x) {↩
assertEq(x | -1, -1);↩
assertEq(-1 | x, -1);↩
assertEq(x & -1, 0);↩
assertEq(-1 & x, 0);↩
assertEq(x ^ -1, -1);↩
assertEq(-1 ^ x, -1);↩
assertEq(x >> -1, 0);↩
assertEq(-1 >> x, -1);↩
assertEq(x >>> -1, 0);↩
assertEq(-1 >>> x, 4294967295);↩
assertEq(x << -1, 0);↩
assertEq(-1 << x, -1);↩
assertEq(x | 1, 1);↩
assertEq(1 | x, 1);↩
assertEq(x & 1, 0);↩
assertEq(1 & x, 0);↩
assertEq(x ^ 1, 1);↩
assertEq(1 ^ x, 1);↩
assertEq(x >> 1, 0);↩
assertEq(1 >> x, 1);↩
assertEq(x >>> 1, 0);↩
assertEq(1 >>> x, 1);↩
assertEq(x << 1, 0);↩
assertEq(1 << x, 1);↩
assertEq(x | 0, 0);↩
assertEq(0 | x, 0);↩
assertEq(x & 0, 0);↩
assertEq(0 & x, 0);↩
assertEq(x ^ 0, 0);↩
assertEq(0 ^ x, 0);↩
assertEq(x >> 0, 0);↩
assertEq(0 >> x, 0);↩
assertEq(x >>> 0, 0);↩
assertEq(0 >>> x, 0);↩
assertEq(x << 0, 0);↩
assertEq(0 << x, 0);↩
assertEq(x | 0xffffffff, -1);↩
assertEq(0xffffffff | x, -1);↩
assertEq(x & 0xffffffff, 0);↩
assertEq(0xffffffff & x, 0);↩
assertEq(x ^ 0xffffffff, -1);↩
assertEq(0xffffffff ^ x, -1);↩
assertEq(x >> 0xffffffff, 0);↩
assertEq(0xffffffff >> x, -1);↩
assertEq(x >>> 0xffffffff, 0);↩
assertEq(0xffffffff >>> x, 4294967295);↩
assertEq(x << 0xffffffff, 0);↩
assertEq(0xffffffff << x, -1);↩
assertEq(x | "10.6", 10);↩
assertEq("10.6" | x, 10);↩
assertEq(x & "10.6", 0);↩
assertEq("10.6" & x, 0);↩
assertEq(x ^ "10.6", 10);↩
assertEq("10.6" ^ x, 10);↩
assertEq(x >> "10.6", 0);↩
assertEq("10.6" >> x, 10);↩
assertEq(x >>> "10.6", 0);↩
assertEq("10.6" >>> x, 10);↩
assertEq(x << "10.6", 0);↩
assertEq("10.6" << x, 10);↩
assertEq(x | 2147483648, -2147483648);↩
assertEq(2147483648 | x, -2147483648);↩
assertEq(x & 2147483648, 0);↩
assertEq(2147483648 & x, 0);↩
assertEq(x ^ 2147483648, -2147483648);↩
assertEq(2147483648 ^ x, -2147483648);↩
assertEq(x >> 2147483648, 0);↩
assertEq(2147483648 >> x, -2147483648);↩
assertEq(x >>> 2147483648, 0);↩
assertEq(2147483648 >>> x, 2147483648);↩
assertEq(x << 2147483648, 0);↩
assertEq(2147483648 << x, -2147483648);↩
assertEq(x | 4294967296, 0);↩
assertEq(4294967296 | x, 0);↩
assertEq(x & 4294967296, 0);↩
assertEq(4294967296 & x, 0);↩
assertEq(x ^ 4294967296, 0);↩
assertEq(4294967296 ^ x, 0);↩
assertEq(x >> 4294967296, 0);↩
assertEq(4294967296 >> x, 0);↩
assertEq(x >>> 4294967296, 0);↩
assertEq(4294967296 >>> x, 0);↩
assertEq(x << 4294967296, 0);↩
assertEq(4294967296 << x, 0);↩
assertEq(x | undefined, 0);↩
assertEq(undefined | x, 0);↩
assertEq(x & undefined, 0);↩
assertEq(undefined & x, 0);↩
assertEq(x ^ undefined, 0);↩
assertEq(undefined ^ x, 0);↩
assertEq(x >> undefined, 0);↩
assertEq(undefined >> x, 0);↩
assertEq(x >>> undefined, 0);↩
assertEq(undefined >>> x, 0);↩
assertEq(x << undefined, 0);↩
assertEq(undefined << x, 0);↩
assertEq(x | null, 0);↩
assertEq(null | x, 0);↩
assertEq(x & null, 0);↩
assertEq(null & x, 0);↩
assertEq(x ^ null, 0);↩
assertEq(null ^ x, 0);↩
assertEq(x >> null, 0);↩
assertEq(null >> x, 0);↩
assertEq(x >>> null, 0);↩
assertEq(null >>> x, 0);↩
assertEq(x << null, 0);↩
assertEq(null << x, 0);↩
assertEq(x | false, 0);↩
assertEq(false | x, 0);↩
assertEq(x & false, 0);↩
assertEq(false & x, 0);↩
assertEq(x ^ false, 0);↩
assertEq(false ^ x, 0);↩
assertEq(x >> false, 0);↩
assertEq(false >> x, 0);↩
assertEq(x >>> false, 0);↩
assertEq(false >>> x, 0);↩
assertEq(x << false, 0);↩
assertEq(false << x, 0);↩
assertEq(x | true, 1);↩
assertEq(true | x, 1);↩
assertEq(x & true, 0);↩
assertEq(true & x, 0);↩
assertEq(x ^ true, 1);↩
assertEq(true ^ x, 1);↩
assertEq(x >> true, 0);↩
assertEq(true >> x, 1);↩
assertEq(x >>> true, 0);↩
assertEq(true >>> x, 1);↩
assertEq(x << true, 0);↩
assertEq(true << x, 1);↩
assertEq(x | -1.5, -1);↩
assertEq(-1.5 | x, -1);↩
assertEq(x & -1.5, 0);↩
assertEq(-1.5 & x, 0);↩
assertEq(x ^ -1.5, -1);↩
assertEq(-1.5 ^ x, -1);↩
assertEq(x >> -1.5, 0);↩
assertEq(-1.5 >> x, -1);↩
assertEq(x >>> -1.5, 0);↩
assertEq(-1.5 >>> x, 4294967295);↩
assertEq(x << -1.5, 0);↩
assertEq(-1.5 << x, -1);↩
}↩
test2(0)↩
↩
function test3 (x) {↩
assertEq(x | -1, -1);↩
assertEq(-1 | x, -1);↩
assertEq(x & -1, -1);↩
assertEq(-1 & x, -1);↩
assertEq(x ^ -1, 0);↩
assertEq(-1 ^ x, 0);↩
assertEq(x >> -1, -1);↩
assertEq(-1 >> x, -1);↩
assertEq(x >>> -1, 1);↩
assertEq(-1 >>> x, 1);↩
assertEq(x << -1, -2147483648);↩
assertEq(-1 << x, -2147483648);↩
assertEq(x | 1, -1);↩
assertEq(1 | x, -1);↩
assertEq(x & 1, 1);↩
assertEq(1 & x, 1);↩
assertEq(x ^ 1, -2);↩
assertEq(1 ^ x, -2);↩
assertEq(x >> 1, -1);↩
assertEq(1 >> x, 0);↩
assertEq(x >>> 1, 2147483647);↩
assertEq(1 >>> x, 0);↩
assertEq(x << 1, -2);↩
assertEq(1 << x, -2147483648);↩
assertEq(x | 0, -1);↩
assertEq(0 | x, -1);↩
assertEq(x & 0, 0);↩
assertEq(0 & x, 0);↩
assertEq(x ^ 0, -1);↩
assertEq(0 ^ x, -1);↩
assertEq(x >> 0, -1);↩
assertEq(0 >> x, 0);↩
assertEq(x >>> 0, 4294967295);↩
assertEq(0 >>> x, 0);↩
assertEq(x << 0, -1);↩
assertEq(0 << x, 0);↩
assertEq(x | 0xffffffff, -1);↩
assertEq(0xffffffff | x, -1);↩
assertEq(x & 0xffffffff, -1);↩
assertEq(0xffffffff & x, -1);↩
assertEq(x ^ 0xffffffff, 0);↩
assertEq(0xffffffff ^ x, 0);↩
assertEq(x >> 0xffffffff, -1);↩
assertEq(0xffffffff >> x, -1);↩
assertEq(x >>> 0xffffffff, 1);↩
assertEq(0xffffffff >>> x, 1);↩
assertEq(x << 0xffffffff, -2147483648);↩
assertEq(0xffffffff << x, -2147483648);↩
assertEq(x | "10.6", -1);↩
assertEq("10.6" | x, -1);↩
assertEq(x & "10.6", 10);↩
assertEq("10.6" & x, 10);↩
assertEq(x ^ "10.6", -11);↩
assertEq("10.6" ^ x, -11);↩
assertEq(x >> "10.6", -1);↩
assertEq("10.6" >> x, 0);↩
assertEq(x >>> "10.6", 4194303);↩
assertEq("10.6" >>> x, 0);↩
assertEq(x << "10.6", -1024);↩
assertEq("10.6" << x, 0);↩
assertEq(x | 2147483648, -1);↩
assertEq(2147483648 | x, -1);↩
assertEq(x & 2147483648, -2147483648);↩
assertEq(2147483648 & x, -2147483648);↩
assertEq(x ^ 2147483648, 2147483647);↩
assertEq(2147483648 ^ x, 2147483647);↩
assertEq(x >> 2147483648, -1);↩
assertEq(2147483648 >> x, -1);↩
assertEq(x >>> 2147483648, 4294967295);↩
assertEq(2147483648 >>> x, 1);↩
assertEq(x << 2147483648, -1);↩
assertEq(2147483648 << x, 0);↩
assertEq(x | 4294967296, -1);↩
assertEq(4294967296 | x, -1);↩
assertEq(x & 4294967296, 0);↩
assertEq(4294967296 & x, 0);↩
assertEq(x ^ 4294967296, -1);↩
assertEq(4294967296 ^ x, -1);↩
assertEq(x >> 4294967296, -1);↩
assertEq(4294967296 >> x, 0);↩
assertEq(x >>> 4294967296, 4294967295);↩
assertEq(4294967296 >>> x, 0);↩
assertEq(x << 4294967296, -1);↩
assertEq(4294967296 << x, 0);↩
assertEq(x | undefined, -1);↩
assertEq(undefined | x, -1);↩
assertEq(x & undefined, 0);↩
assertEq(undefined & x, 0);↩
assertEq(x ^ undefined, -1);↩
assertEq(undefined ^ x, -1);↩
assertEq(x >> undefined, -1);↩
assertEq(undefined >> x, 0);↩
assertEq(x >>> undefined, 4294967295);↩
assertEq(undefined >>> x, 0);↩
assertEq(x << undefined, -1);↩
assertEq(undefined << x, 0);↩
assertEq(x | null, -1);↩
assertEq(null | x, -1);↩
assertEq(x & null, 0);↩
assertEq(null & x, 0);↩
assertEq(x ^ null, -1);↩
assertEq(null ^ x, -1);↩
assertEq(x >> null, -1);↩
assertEq(null >> x, 0);↩
assertEq(x >>> null, 4294967295);↩
assertEq(null >>> x, 0);↩
assertEq(x << null, -1);↩
assertEq(null << x, 0);↩
assertEq(x | false, -1);↩
assertEq(false | x, -1);↩
assertEq(x & false, 0);↩
assertEq(false & x, 0);↩
assertEq(x ^ false, -1);↩
assertEq(false ^ x, -1);↩
assertEq(x >> false, -1);↩
assertEq(false >> x, 0);↩
assertEq(x >>> false, 4294967295);↩
assertEq(false >>> x, 0);↩
assertEq(x << false, -1);↩
assertEq(false << x, 0);↩
assertEq(x | true, -1);↩
assertEq(true | x, -1);↩
assertEq(x & true, 1);↩
assertEq(true & x, 1);↩
assertEq(x ^ true, -2);↩
assertEq(true ^ x, -2);↩
assertEq(x >> true, -1);↩
assertEq(true >> x, 0);↩
assertEq(x >>> true, 2147483647);↩
assertEq(true >>> x, 0);↩
assertEq(x << true, -2);↩
assertEq(true << x, -2147483648);↩
assertEq(x | -1.5, -1);↩
assertEq(-1.5 | x, -1);↩
assertEq(x & -1.5, -1);↩
assertEq(-1.5 & x, -1);↩
assertEq(x ^ -1.5, 0);↩
assertEq(-1.5 ^ x, 0);↩
assertEq(x >> -1.5, -1);↩
assertEq(-1.5 >> x, -1);↩
assertEq(x >>> -1.5, 1);↩
assertEq(-1.5 >>> x, 1);↩
assertEq(x << -1.5, -2147483648);↩
assertEq(-1.5 << x, -2147483648);↩
}↩
test3(-1)↩
↩
function test4 (x) {↩
assertEq(x | -1, -1);↩
assertEq(-1 | x, -1);↩
assertEq(x & -1, -2147483648);↩
assertEq(-1 & x, -2147483648);↩
assertEq(x ^ -1, 2147483647);↩
assertEq(-1 ^ x, 2147483647);↩
assertEq(x >> -1, -1);↩
assertEq(-1 >> x, -1);↩
assertEq(x >>> -1, 1);↩
assertEq(-1 >>> x, 4294967295);↩
assertEq(x << -1, 0);↩
assertEq(-1 << x, -1);↩
assertEq(x | 1, -2147483647);↩
assertEq(1 | x, -2147483647);↩
assertEq(x & 1, 0);↩
assertEq(1 & x, 0);↩
assertEq(x ^ 1, -2147483647);↩
assertEq(1 ^ x, -2147483647);↩
assertEq(x >> 1, -1073741824);↩
assertEq(1 >> x, 1);↩
assertEq(x >>> 1, 1073741824);↩
assertEq(1 >>> x, 1);↩
assertEq(x << 1, 0);↩
assertEq(1 << x, 1);↩
assertEq(x | 0, -2147483648);↩
assertEq(0 | x, -2147483648);↩
assertEq(x & 0, 0);↩
assertEq(0 & x, 0);↩
assertEq(x ^ 0, -2147483648);↩
assertEq(0 ^ x, -2147483648);↩
assertEq(x >> 0, -2147483648);↩
assertEq(0 >> x, 0);↩
assertEq(x >>> 0, 2147483648);↩
assertEq(0 >>> x, 0);↩
assertEq(x << 0, -2147483648);↩
assertEq(0 << x, 0);↩
assertEq(x | 0xffffffff, -1);↩
assertEq(0xffffffff | x, -1);↩
assertEq(x & 0xffffffff, -2147483648);↩
assertEq(0xffffffff & x, -2147483648);↩
assertEq(x ^ 0xffffffff, 2147483647);↩
assertEq(0xffffffff ^ x, 2147483647);↩
assertEq(x >> 0xffffffff, -1);↩
assertEq(0xffffffff >> x, -1);↩
assertEq(x >>> 0xffffffff, 1);↩
assertEq(0xffffffff >>> x, 4294967295);↩
assertEq(x << 0xffffffff, 0);↩
assertEq(0xffffffff << x, -1);↩
assertEq(x | "10.6", -2147483638);↩
assertEq("10.6" | x, -2147483638);↩
assertEq(x & "10.6", 0);↩
assertEq("10.6" & x, 0);↩
assertEq(x ^ "10.6", -2147483638);↩
assertEq("10.6" ^ x, -2147483638);↩
assertEq(x >> "10.6", -2097152);↩
assertEq("10.6" >> x, 10);↩
assertEq(x >>> "10.6", 2097152);↩
assertEq("10.6" >>> x, 10);↩
assertEq(x << "10.6", 0);↩
assertEq("10.6" << x, 10);↩
assertEq(x | 2147483648, -2147483648);↩
assertEq(2147483648 | x, -2147483648);↩
assertEq(x & 2147483648, -2147483648);↩
assertEq(2147483648 & x, -2147483648);↩
assertEq(x ^ 2147483648, 0);↩
assertEq(2147483648 ^ x, 0);↩
assertEq(x >> 2147483648, -2147483648);↩
assertEq(2147483648 >> x, -2147483648);↩
assertEq(x >>> 2147483648, 2147483648);↩
assertEq(2147483648 >>> x, 2147483648);↩
assertEq(x << 2147483648, -2147483648);↩
assertEq(2147483648 << x, -2147483648);↩
assertEq(x | 4294967296, -2147483648);↩
assertEq(4294967296 | x, -2147483648);↩
assertEq(x & 4294967296, 0);↩
assertEq(4294967296 & x, 0);↩
assertEq(x ^ 4294967296, -2147483648);↩
assertEq(4294967296 ^ x, -2147483648);↩
assertEq(x >> 4294967296, -2147483648);↩
assertEq(4294967296 >> x, 0);↩
assertEq(x >>> 4294967296, 2147483648);↩
assertEq(4294967296 >>> x, 0);↩
assertEq(x << 4294967296, -2147483648);↩
assertEq(4294967296 << x, 0);↩
assertEq(x | undefined, -2147483648);↩
assertEq(undefined | x, -2147483648);↩
assertEq(x & undefined, 0);↩
assertEq(undefined & x, 0);↩
assertEq(x ^ undefined, -2147483648);↩
assertEq(undefined ^ x, -2147483648);↩
assertEq(x >> undefined, -2147483648);↩
assertEq(undefined >> x, 0);↩
assertEq(x >>> undefined, 2147483648);↩
assertEq(undefined >>> x, 0);↩
assertEq(x << undefined, -2147483648);↩
assertEq(undefined << x, 0);↩
assertEq(x | null, -2147483648);↩
assertEq(null | x, -2147483648);↩
assertEq(x & null, 0);↩
assertEq(null & x, 0);↩
assertEq(x ^ null, -2147483648);↩
assertEq(null ^ x, -2147483648);↩
assertEq(x >> null, -2147483648);↩
assertEq(null >> x, 0);↩
assertEq(x >>> null, 2147483648);↩
assertEq(null >>> x, 0);↩
assertEq(x << null, -2147483648);↩
assertEq(null << x, 0);↩
assertEq(x | false, -2147483648);↩
assertEq(false | x, -2147483648);↩
assertEq(x & false, 0);↩
assertEq(false & x, 0);↩
assertEq(x ^ false, -2147483648);↩
assertEq(false ^ x, -2147483648);↩
assertEq(x >> false, -2147483648);↩
assertEq(false >> x, 0);↩
assertEq(x >>> false, 2147483648);↩
assertEq(false >>> x, 0);↩
assertEq(x << false, -2147483648);↩
assertEq(false << x, 0);↩
assertEq(x | true, -2147483647);↩
assertEq(true | x, -2147483647);↩
assertEq(x & true, 0);↩
assertEq(true & x, 0);↩
assertEq(x ^ true, -2147483647);↩
assertEq(true ^ x, -2147483647);↩
assertEq(x >> true, -1073741824);↩
assertEq(true >> x, 1);↩
assertEq(x >>> true, 1073741824);↩
assertEq(true >>> x, 1);↩
assertEq(x << true, 0);↩
assertEq(true << x, 1);↩
assertEq(x | -1.5, -1);↩
assertEq(-1.5 | x, -1);↩
assertEq(x & -1.5, -2147483648);↩
assertEq(-1.5 & x, -2147483648);↩
assertEq(x ^ -1.5, 2147483647);↩
assertEq(-1.5 ^ x, 2147483647);↩
assertEq(x >> -1.5, -1);↩
assertEq(-1.5 >> x, -1);↩
assertEq(x >>> -1.5, 1);↩
assertEq(-1.5 >>> x, 4294967295);↩
assertEq(x << -1.5, 0);↩
assertEq(-1.5 << x, -1);↩
}↩
test4(2147483648)↩
↩
function test5 (x) {↩
assertEq(x | -1, -1);↩
assertEq(-1 | x, -1);↩
assertEq(x & -1, -2147483648);↩
assertEq(-1 & x, -2147483648);↩
assertEq(x ^ -1, 2147483647);↩
assertEq(-1 ^ x, 2147483647);↩
assertEq(x >> -1, -1);↩
assertEq(-1 >> x, -1);↩
assertEq(x >>> -1, 1);↩
assertEq(-1 >>> x, 4294967295);↩
assertEq(x << -1, 0);↩
assertEq(-1 << x, -1);↩
assertEq(x | 1, -2147483647);↩
assertEq(1 | x, -2147483647);↩
assertEq(x & 1, 0);↩
assertEq(1 & x, 0);↩
assertEq(x ^ 1, -2147483647);↩
assertEq(1 ^ x, -2147483647);↩
assertEq(x >> 1, -1073741824);↩
assertEq(1 >> x, 1);↩
assertEq(x >>> 1, 1073741824);↩
assertEq(1 >>> x, 1);↩
assertEq(x << 1, 0);↩
assertEq(1 << x, 1);↩
assertEq(x | 0, -2147483648);↩
assertEq(0 | x, -2147483648);↩
assertEq(x & 0, 0);↩
assertEq(0 & x, 0);↩
assertEq(x ^ 0, -2147483648);↩
assertEq(0 ^ x, -2147483648);↩
assertEq(x >> 0, -2147483648);↩
assertEq(0 >> x, 0);↩
assertEq(x >>> 0, 2147483648);↩
assertEq(0 >>> x, 0);↩
assertEq(x << 0, -2147483648);↩
assertEq(0 << x, 0);↩
assertEq(x | 0xffffffff, -1);↩
assertEq(0xffffffff | x, -1);↩
assertEq(x & 0xffffffff, -2147483648);↩
assertEq(0xffffffff & x, -2147483648);↩
assertEq(x ^ 0xffffffff, 2147483647);↩
assertEq(0xffffffff ^ x, 2147483647);↩
assertEq(x >> 0xffffffff, -1);↩
assertEq(0xffffffff >> x, -1);↩
assertEq(x >>> 0xffffffff, 1);↩
assertEq(0xffffffff >>> x, 4294967295);↩
assertEq(x << 0xffffffff, 0);↩
assertEq(0xffffffff << x, -1);↩
assertEq(x | "10.6", -2147483638);↩
assertEq("10.6" | x, -2147483638);↩
assertEq(x & "10.6", 0);↩
assertEq("10.6" & x, 0);↩
assertEq(x ^ "10.6", -2147483638);↩
assertEq("10.6" ^ x, -2147483638);↩
assertEq(x >> "10.6", -2097152);↩
assertEq("10.6" >> x, 10);↩
assertEq(x >>> "10.6", 2097152);↩
assertEq("10.6" >>> x, 10);↩
assertEq(x << "10.6", 0);↩
assertEq("10.6" << x, 10);↩
assertEq(x | 2147483648, -2147483648);↩
assertEq(2147483648 | x, -2147483648);↩
assertEq(x & 2147483648, -2147483648);↩
assertEq(2147483648 & x, -2147483648);↩
assertEq(x ^ 2147483648, 0);↩
assertEq(2147483648 ^ x, 0);↩
assertEq(x >> 2147483648, -2147483648);↩
assertEq(2147483648 >> x, -2147483648);↩
assertEq(x >>> 2147483648, 2147483648);↩
assertEq(2147483648 >>> x, 2147483648);↩
assertEq(x << 2147483648, -2147483648);↩
assertEq(2147483648 << x, -2147483648);↩
assertEq(x | 4294967296, -2147483648);↩
assertEq(4294967296 | x, -2147483648);↩
assertEq(x & 4294967296, 0);↩
assertEq(4294967296 & x, 0);↩
assertEq(x ^ 4294967296, -2147483648);↩
assertEq(4294967296 ^ x, -2147483648);↩
assertEq(x >> 4294967296, -2147483648);↩
assertEq(4294967296 >> x, 0);↩
assertEq(x >>> 4294967296, 2147483648);↩
assertEq(4294967296 >>> x, 0);↩
assertEq(x << 4294967296, -2147483648);↩
assertEq(4294967296 << x, 0);↩
assertEq(x | undefined, -2147483648);↩
assertEq(undefined | x, -2147483648);↩
assertEq(x & undefined, 0);↩
assertEq(undefined & x, 0);↩
assertEq(x ^ undefined, -2147483648);↩
assertEq(undefined ^ x, -2147483648);↩
assertEq(x >> undefined, -2147483648);↩
assertEq(undefined >> x, 0);↩
assertEq(x >>> undefined, 2147483648);↩
assertEq(undefined >>> x, 0);↩
assertEq(x << undefined, -2147483648);↩
assertEq(undefined << x, 0);↩
assertEq(x | null, -2147483648);↩
assertEq(null | x, -2147483648);↩
assertEq(x & null, 0);↩
assertEq(null & x, 0);↩
assertEq(x ^ null, -2147483648);↩
assertEq(null ^ x, -2147483648);↩
assertEq(x >> null, -2147483648);↩
assertEq(null >> x, 0);↩
assertEq(x >>> null, 2147483648);↩
assertEq(null >>> x, 0);↩
assertEq(x << null, -2147483648);↩
assertEq(null << x, 0);↩
assertEq(x | false, -2147483648);↩
assertEq(false | x, -2147483648);↩
assertEq(x & false, 0);↩
assertEq(false & x, 0);↩
assertEq(x ^ false, -2147483648);↩
assertEq(false ^ x, -2147483648);↩
assertEq(x >> false, -2147483648);↩
assertEq(false >> x, 0);↩
assertEq(x >>> false, 2147483648);↩
assertEq(false >>> x, 0);↩
assertEq(x << false, -2147483648);↩
assertEq(false << x, 0);↩
assertEq(x | true, -2147483647);↩
assertEq(true | x, -2147483647);↩
assertEq(x & true, 0);↩
assertEq(true & x, 0);↩
assertEq(x ^ true, -2147483647);↩
assertEq(true ^ x, -2147483647);↩
assertEq(x >> true, -1073741824);↩
assertEq(true >> x, 1);↩
assertEq(x >>> true, 1073741824);↩
assertEq(true >>> x, 1);↩
assertEq(x << true, 0);↩
assertEq(true << x, 1);↩
assertEq(x | -1.5, -1);↩
assertEq(-1.5 | x, -1);↩
assertEq(x & -1.5, -2147483648);↩
assertEq(-1.5 & x, -2147483648);↩
assertEq(x ^ -1.5, 2147483647);↩
assertEq(-1.5 ^ x, 2147483647);↩
assertEq(x >> -1.5, -1);↩
assertEq(-1.5 >> x, -1);↩
assertEq(x >>> -1.5, 1);↩
assertEq(-1.5 >>> x, 4294967295);↩
assertEq(x << -1.5, 0);↩
assertEq(-1.5 << x, -1);↩
}↩
test5(-2147483648)↩
↩
↩