1
1
Fork 1
mirror of https://github.com/oddlama/nixos-extra-modules.git synced 2025-10-10 13:50:39 +02:00
oddlama_nixos-extra-modules/tests/shift.nix
Patrick fb68031848
fix: tests
fix: arithmeticRight
2025-04-15 10:47:11 +02:00

399 lines
30 KiB
Nix

{
nixt,
pkgs,
...
}:
let
inherit (nixt.lib) block describe it;
inherit (pkgs.lib.bit) left logicalRight arithmeticRight;
in
block ./shift.nix [
(describe "" [
(it "left shift 31065 << 63" (left 63 31065 == -9223372036854775807 - 1))
(it "negative left shift 31065 << 63" (left 63 (-31065) == -9223372036854775807 - 1))
(it "logical right shift 31065 >> 63" (logicalRight 63 31065 == 0))
(it "negative logical right shift 31065 >> 63" (logicalRight 63 (-31065) == 1))
(it "arithmetic right shift 31065 >> 63" (arithmeticRight 63 31065 == 0))
(it "negative arithmetic right shift 31065 >> 63" (arithmeticRight 63 (-31065) == -1))
(it "left shift 25624 << 62" (left 62 25624 == 0))
(it "negative left shift 25624 << 62" (left 62 (-25624) == 0))
(it "logical right shift 25624 >> 62" (logicalRight 62 25624 == 0))
(it "negative logical right shift 25624 >> 62" (logicalRight 62 (-25624) == 3))
(it "arithmetic right shift 25624 >> 62" (arithmeticRight 62 25624 == 0))
(it "negative arithmetic right shift 25624 >> 62" (arithmeticRight 62 (-25624) == -1))
(it "left shift 308 << 61" (left 61 308 == -9223372036854775807 - 1))
(it "negative left shift 308 << 61" (left 61 (-308) == -9223372036854775807 - 1))
(it "logical right shift 308 >> 61" (logicalRight 61 308 == 0))
(it "negative logical right shift 308 >> 61" (logicalRight 61 (-308) == 7))
(it "arithmetic right shift 308 >> 61" (arithmeticRight 61 308 == 0))
(it "negative arithmetic right shift 308 >> 61" (arithmeticRight 61 (-308) == -1))
(it "left shift 16712 << 60" (left 60 16712 == -9223372036854775807 - 1))
(it "negative left shift 16712 << 60" (left 60 (-16712) == -9223372036854775807 - 1))
(it "logical right shift 16712 >> 60" (logicalRight 60 16712 == 0))
(it "negative logical right shift 16712 >> 60" (logicalRight 60 (-16712) == 15))
(it "arithmetic right shift 16712 >> 60" (arithmeticRight 60 16712 == 0))
(it "negative arithmetic right shift 16712 >> 60" (arithmeticRight 60 (-16712) == -1))
(it "left shift 5852 << 59" (left 59 5852 == -2305843009213693952))
(it "negative left shift 5852 << 59" (left 59 (-5852) == 2305843009213693952))
(it "logical right shift 5852 >> 59" (logicalRight 59 5852 == 0))
(it "negative logical right shift 5852 >> 59" (logicalRight 59 (-5852) == 31))
(it "arithmetic right shift 5852 >> 59" (arithmeticRight 59 5852 == 0))
(it "negative arithmetic right shift 5852 >> 59" (arithmeticRight 59 (-5852) == -1))
(it "left shift 389 << 58" (left 58 389 == 1441151880758558720))
(it "negative left shift 389 << 58" (left 58 (-389) == -1441151880758558720))
(it "logical right shift 389 >> 58" (logicalRight 58 389 == 0))
(it "negative logical right shift 389 >> 58" (logicalRight 58 (-389) == 63))
(it "arithmetic right shift 389 >> 58" (arithmeticRight 58 389 == 0))
(it "negative arithmetic right shift 389 >> 58" (arithmeticRight 58 (-389) == -1))
(it "left shift 13663 << 57" (left 57 13663 == -4755801206503243776))
(it "negative left shift 13663 << 57" (left 57 (-13663) == 4755801206503243776))
(it "logical right shift 13663 >> 57" (logicalRight 57 13663 == 0))
(it "negative logical right shift 13663 >> 57" (logicalRight 57 (-13663) == 127))
(it "arithmetic right shift 13663 >> 57" (arithmeticRight 57 13663 == 0))
(it "negative arithmetic right shift 13663 >> 57" (arithmeticRight 57 (-13663) == -1))
(it "left shift 15349 << 56" (left 56 15349 == -792633534417207296))
(it "negative left shift 15349 << 56" (left 56 (-15349) == 792633534417207296))
(it "logical right shift 15349 >> 56" (logicalRight 56 15349 == 0))
(it "negative logical right shift 15349 >> 56" (logicalRight 56 (-15349) == 255))
(it "arithmetic right shift 15349 >> 56" (arithmeticRight 56 15349 == 0))
(it "negative arithmetic right shift 15349 >> 56" (arithmeticRight 56 (-15349) == -1))
(it "left shift 25817 << 55" (left 55 25817 == 7818248953115181056))
(it "negative left shift 25817 << 55" (left 55 (-25817) == -7818248953115181056))
(it "logical right shift 25817 >> 55" (logicalRight 55 25817 == 0))
(it "negative logical right shift 25817 >> 55" (logicalRight 55 (-25817) == 511))
(it "arithmetic right shift 25817 >> 55" (arithmeticRight 55 25817 == 0))
(it "negative arithmetic right shift 25817 >> 55" (arithmeticRight 55 (-25817) == -1))
(it "left shift 896 << 54" (left 54 896 == -2305843009213693952))
(it "negative left shift 896 << 54" (left 54 (-896) == 2305843009213693952))
(it "logical right shift 896 >> 54" (logicalRight 54 896 == 0))
(it "negative logical right shift 896 >> 54" (logicalRight 54 (-896) == 1023))
(it "arithmetic right shift 896 >> 54" (arithmeticRight 54 896 == 0))
(it "negative arithmetic right shift 896 >> 54" (arithmeticRight 54 (-896) == -1))
(it "left shift 14592 << 53" (left 53 14592 == 2305843009213693952))
(it "negative left shift 14592 << 53" (left 53 (-14592) == -2305843009213693952))
(it "logical right shift 14592 >> 53" (logicalRight 53 14592 == 0))
(it "negative logical right shift 14592 >> 53" (logicalRight 53 (-14592) == 2047))
(it "arithmetic right shift 14592 >> 53" (arithmeticRight 53 14592 == 0))
(it "negative arithmetic right shift 14592 >> 53" (arithmeticRight 53 (-14592) == -1))
(it "left shift 8533 << 52" (left 52 8533 == 1535727472933339136))
(it "negative left shift 8533 << 52" (left 52 (-8533) == -1535727472933339136))
(it "logical right shift 8533 >> 52" (logicalRight 52 8533 == 0))
(it "negative logical right shift 8533 >> 52" (logicalRight 52 (-8533) == 4095))
(it "arithmetic right shift 8533 >> 52" (arithmeticRight 52 8533 == 0))
(it "negative arithmetic right shift 8533 >> 52" (arithmeticRight 52 (-8533) == -1))
(it "left shift 30180 << 51" (left 51 30180 == -5827657917817421824))
(it "negative left shift 30180 << 51" (left 51 (-30180) == 5827657917817421824))
(it "logical right shift 30180 >> 51" (logicalRight 51 30180 == 0))
(it "negative logical right shift 30180 >> 51" (logicalRight 51 (-30180) == 8191))
(it "arithmetic right shift 30180 >> 51" (arithmeticRight 51 30180 == 0))
(it "negative arithmetic right shift 30180 >> 51" (arithmeticRight 51 (-30180) == -1))
(it "left shift 24903 << 50" (left 50 24903 == -8855202767317237760))
(it "negative left shift 24903 << 50" (left 50 (-24903) == 8855202767317237760))
(it "logical right shift 24903 >> 50" (logicalRight 50 24903 == 0))
(it "negative logical right shift 24903 >> 50" (logicalRight 50 (-24903) == 16383))
(it "arithmetic right shift 24903 >> 50" (arithmeticRight 50 24903 == 0))
(it "negative arithmetic right shift 24903 >> 50" (arithmeticRight 50 (-24903) == -1))
(it "left shift 14440 << 49" (left 49 14440 == 8128997327403745280))
(it "negative left shift 14440 << 49" (left 49 (-14440) == -8128997327403745280))
(it "logical right shift 14440 >> 49" (logicalRight 49 14440 == 0))
(it "negative logical right shift 14440 >> 49" (logicalRight 49 (-14440) == 32767))
(it "arithmetic right shift 14440 >> 49" (arithmeticRight 49 14440 == 0))
(it "negative arithmetic right shift 14440 >> 49" (arithmeticRight 49 (-14440) == -1))
(it "left shift 7398 << 48" (left 48 7398 == 2082351877705433088))
(it "negative left shift 7398 << 48" (left 48 (-7398) == -2082351877705433088))
(it "logical right shift 7398 >> 48" (logicalRight 48 7398 == 0))
(it "negative logical right shift 7398 >> 48" (logicalRight 48 (-7398) == 65535))
(it "arithmetic right shift 7398 >> 48" (arithmeticRight 48 7398 == 0))
(it "negative arithmetic right shift 7398 >> 48" (arithmeticRight 48 (-7398) == -1))
(it "left shift 10215 << 47" (left 47 10215 == 1437633443549675520))
(it "negative left shift 10215 << 47" (left 47 (-10215) == -1437633443549675520))
(it "logical right shift 10215 >> 47" (logicalRight 47 10215 == 0))
(it "negative logical right shift 10215 >> 47" (logicalRight 47 (-10215) == 131071))
(it "arithmetic right shift 10215 >> 47" (arithmeticRight 47 10215 == 0))
(it "negative arithmetic right shift 10215 >> 47" (arithmeticRight 47 (-10215) == -1))
(it "left shift 10172 << 46" (left 46 10172 == 715790865775198208))
(it "negative left shift 10172 << 46" (left 46 (-10172) == -715790865775198208))
(it "logical right shift 10172 >> 46" (logicalRight 46 10172 == 0))
(it "negative logical right shift 10172 >> 46" (logicalRight 46 (-10172) == 262143))
(it "arithmetic right shift 10172 >> 46" (arithmeticRight 46 10172 == 0))
(it "negative arithmetic right shift 10172 >> 46" (arithmeticRight 46 (-10172) == -1))
(it "left shift 15671 << 45" (left 45 15671 == 551374295004086272))
(it "negative left shift 15671 << 45" (left 45 (-15671) == -551374295004086272))
(it "logical right shift 15671 >> 45" (logicalRight 45 15671 == 0))
(it "negative logical right shift 15671 >> 45" (logicalRight 45 (-15671) == 524287))
(it "arithmetic right shift 15671 >> 45" (arithmeticRight 45 15671 == 0))
(it "negative arithmetic right shift 15671 >> 45" (arithmeticRight 45 (-15671) == -1))
(it "left shift 22286 << 44" (left 44 22286 == 392059458185854976))
(it "negative left shift 22286 << 44" (left 44 (-22286) == -392059458185854976))
(it "logical right shift 22286 >> 44" (logicalRight 44 22286 == 0))
(it "negative logical right shift 22286 >> 44" (logicalRight 44 (-22286) == 1048575))
(it "arithmetic right shift 22286 >> 44" (arithmeticRight 44 22286 == 0))
(it "negative arithmetic right shift 22286 >> 44" (arithmeticRight 44 (-22286) == -1))
(it "left shift 29742 << 43" (left 43 29742 == 261613398666510336))
(it "negative left shift 29742 << 43" (left 43 (-29742) == -261613398666510336))
(it "logical right shift 29742 >> 43" (logicalRight 43 29742 == 0))
(it "negative logical right shift 29742 >> 43" (logicalRight 43 (-29742) == 2097151))
(it "arithmetic right shift 29742 >> 43" (arithmeticRight 43 29742 == 0))
(it "negative arithmetic right shift 29742 >> 43" (arithmeticRight 43 (-29742) == -1))
(it "left shift 13223 << 42" (left 42 13223 == 58155369016328192))
(it "negative left shift 13223 << 42" (left 42 (-13223) == -58155369016328192))
(it "logical right shift 13223 >> 42" (logicalRight 42 13223 == 0))
(it "negative logical right shift 13223 >> 42" (logicalRight 42 (-13223) == 4194303))
(it "arithmetic right shift 13223 >> 42" (arithmeticRight 42 13223 == 0))
(it "negative arithmetic right shift 13223 >> 42" (arithmeticRight 42 (-13223) == -1))
(it "left shift 27362 << 41" (left 41 27362 == 60169674318413824))
(it "negative left shift 27362 << 41" (left 41 (-27362) == -60169674318413824))
(it "logical right shift 27362 >> 41" (logicalRight 41 27362 == 0))
(it "negative logical right shift 27362 >> 41" (logicalRight 41 (-27362) == 8388607))
(it "arithmetic right shift 27362 >> 41" (arithmeticRight 41 27362 == 0))
(it "negative arithmetic right shift 27362 >> 41" (arithmeticRight 41 (-27362) == -1))
(it "left shift 9358 << 40" (left 40 9358 == 10289229812727808))
(it "negative left shift 9358 << 40" (left 40 (-9358) == -10289229812727808))
(it "logical right shift 9358 >> 40" (logicalRight 40 9358 == 0))
(it "negative logical right shift 9358 >> 40" (logicalRight 40 (-9358) == 16777215))
(it "arithmetic right shift 9358 >> 40" (arithmeticRight 40 9358 == 0))
(it "negative arithmetic right shift 9358 >> 40" (arithmeticRight 40 (-9358) == -1))
(it "left shift 11691 << 39" (left 39 11691 == 6427195220164608))
(it "negative left shift 11691 << 39" (left 39 (-11691) == -6427195220164608))
(it "logical right shift 11691 >> 39" (logicalRight 39 11691 == 0))
(it "negative logical right shift 11691 >> 39" (logicalRight 39 (-11691) == 33554431))
(it "arithmetic right shift 11691 >> 39" (arithmeticRight 39 11691 == 0))
(it "negative arithmetic right shift 11691 >> 39" (arithmeticRight 39 (-11691) == -1))
(it "left shift 18608 << 38" (left 38 18608 == 5114928092413952))
(it "negative left shift 18608 << 38" (left 38 (-18608) == -5114928092413952))
(it "logical right shift 18608 >> 38" (logicalRight 38 18608 == 0))
(it "negative logical right shift 18608 >> 38" (logicalRight 38 (-18608) == 67108863))
(it "arithmetic right shift 18608 >> 38" (arithmeticRight 38 18608 == 0))
(it "negative arithmetic right shift 18608 >> 38" (arithmeticRight 38 (-18608) == -1))
(it "left shift 30802 << 37" (left 37 30802 == 4233394644844544))
(it "negative left shift 30802 << 37" (left 37 (-30802) == -4233394644844544))
(it "logical right shift 30802 >> 37" (logicalRight 37 30802 == 0))
(it "negative logical right shift 30802 >> 37" (logicalRight 37 (-30802) == 134217727))
(it "arithmetic right shift 30802 >> 37" (arithmeticRight 37 30802 == 0))
(it "negative arithmetic right shift 30802 >> 37" (arithmeticRight 37 (-30802) == -1))
(it "left shift 25321 << 36" (left 36 25321 == 1740045870432256))
(it "negative left shift 25321 << 36" (left 36 (-25321) == -1740045870432256))
(it "logical right shift 25321 >> 36" (logicalRight 36 25321 == 0))
(it "negative logical right shift 25321 >> 36" (logicalRight 36 (-25321) == 268435455))
(it "arithmetic right shift 25321 >> 36" (arithmeticRight 36 25321 == 0))
(it "negative arithmetic right shift 25321 >> 36" (arithmeticRight 36 (-25321) == -1))
(it "left shift 21777 << 35" (left 35 21777 == 748252022439936))
(it "negative left shift 21777 << 35" (left 35 (-21777) == -748252022439936))
(it "logical right shift 21777 >> 35" (logicalRight 35 21777 == 0))
(it "negative logical right shift 21777 >> 35" (logicalRight 35 (-21777) == 536870911))
(it "arithmetic right shift 21777 >> 35" (arithmeticRight 35 21777 == 0))
(it "negative arithmetic right shift 21777 >> 35" (arithmeticRight 35 (-21777) == -1))
(it "left shift 19037 << 34" (left 34 19037 == 327053169655808))
(it "negative left shift 19037 << 34" (left 34 (-19037) == -327053169655808))
(it "logical right shift 19037 >> 34" (logicalRight 34 19037 == 0))
(it "negative logical right shift 19037 >> 34" (logicalRight 34 (-19037) == 1073741823))
(it "arithmetic right shift 19037 >> 34" (arithmeticRight 34 19037 == 0))
(it "negative arithmetic right shift 19037 >> 34" (arithmeticRight 34 (-19037) == -1))
(it "left shift 23041 << 33" (left 33 23041 == 197920682934272))
(it "negative left shift 23041 << 33" (left 33 (-23041) == -197920682934272))
(it "logical right shift 23041 >> 33" (logicalRight 33 23041 == 0))
(it "negative logical right shift 23041 >> 33" (logicalRight 33 (-23041) == 2147483647))
(it "arithmetic right shift 23041 >> 33" (arithmeticRight 33 23041 == 0))
(it "negative arithmetic right shift 23041 >> 33" (arithmeticRight 33 (-23041) == -1))
(it "left shift 13483 << 32" (left 32 13483 == 57909044051968))
(it "negative left shift 13483 << 32" (left 32 (-13483) == -57909044051968))
(it "logical right shift 13483 >> 32" (logicalRight 32 13483 == 0))
(it "negative logical right shift 13483 >> 32" (logicalRight 32 (-13483) == 4294967295))
(it "arithmetic right shift 13483 >> 32" (arithmeticRight 32 13483 == 0))
(it "negative arithmetic right shift 13483 >> 32" (arithmeticRight 32 (-13483) == -1))
(it "left shift 12790 << 31" (left 31 12790 == 27466315857920))
(it "negative left shift 12790 << 31" (left 31 (-12790) == -27466315857920))
(it "logical right shift 12790 >> 31" (logicalRight 31 12790 == 0))
(it "negative logical right shift 12790 >> 31" (logicalRight 31 (-12790) == 8589934591))
(it "arithmetic right shift 12790 >> 31" (arithmeticRight 31 12790 == 0))
(it "negative arithmetic right shift 12790 >> 31" (arithmeticRight 31 (-12790) == -1))
(it "left shift 29648 << 30" (left 30 29648 == 31834297597952))
(it "negative left shift 29648 << 30" (left 30 (-29648) == -31834297597952))
(it "logical right shift 29648 >> 30" (logicalRight 30 29648 == 0))
(it "negative logical right shift 29648 >> 30" (logicalRight 30 (-29648) == 17179869183))
(it "arithmetic right shift 29648 >> 30" (arithmeticRight 30 29648 == 0))
(it "negative arithmetic right shift 29648 >> 30" (arithmeticRight 30 (-29648) == -1))
(it "left shift 31723 << 29" (left 29 31723 == 17031155941376))
(it "negative left shift 31723 << 29" (left 29 (-31723) == -17031155941376))
(it "logical right shift 31723 >> 29" (logicalRight 29 31723 == 0))
(it "negative logical right shift 31723 >> 29" (logicalRight 29 (-31723) == 34359738367))
(it "arithmetic right shift 31723 >> 29" (arithmeticRight 29 31723 == 0))
(it "negative arithmetic right shift 31723 >> 29" (arithmeticRight 29 (-31723) == -1))
(it "left shift 429 << 28" (left 28 429 == 115158810624))
(it "negative left shift 429 << 28" (left 28 (-429) == -115158810624))
(it "logical right shift 429 >> 28" (logicalRight 28 429 == 0))
(it "negative logical right shift 429 >> 28" (logicalRight 28 (-429) == 68719476735))
(it "arithmetic right shift 429 >> 28" (arithmeticRight 28 429 == 0))
(it "negative arithmetic right shift 429 >> 28" (arithmeticRight 28 (-429) == -1))
(it "left shift 3138 << 27" (left 27 3138 == 421175230464))
(it "negative left shift 3138 << 27" (left 27 (-3138) == -421175230464))
(it "logical right shift 3138 >> 27" (logicalRight 27 3138 == 0))
(it "negative logical right shift 3138 >> 27" (logicalRight 27 (-3138) == 137438953471))
(it "arithmetic right shift 3138 >> 27" (arithmeticRight 27 3138 == 0))
(it "negative arithmetic right shift 3138 >> 27" (arithmeticRight 27 (-3138) == -1))
(it "left shift 20136 << 26" (left 26 20136 == 1351304085504))
(it "negative left shift 20136 << 26" (left 26 (-20136) == -1351304085504))
(it "logical right shift 20136 >> 26" (logicalRight 26 20136 == 0))
(it "negative logical right shift 20136 >> 26" (logicalRight 26 (-20136) == 274877906943))
(it "arithmetic right shift 20136 >> 26" (arithmeticRight 26 20136 == 0))
(it "negative arithmetic right shift 20136 >> 26" (arithmeticRight 26 (-20136) == -1))
(it "left shift 27841 << 25" (left 25 27841 == 934188941312))
(it "negative left shift 27841 << 25" (left 25 (-27841) == -934188941312))
(it "logical right shift 27841 >> 25" (logicalRight 25 27841 == 0))
(it "negative logical right shift 27841 >> 25" (logicalRight 25 (-27841) == 549755813887))
(it "arithmetic right shift 27841 >> 25" (arithmeticRight 25 27841 == 0))
(it "negative arithmetic right shift 27841 >> 25" (arithmeticRight 25 (-27841) == -1))
(it "left shift 23965 << 24" (left 24 23965 == 402065981440))
(it "negative left shift 23965 << 24" (left 24 (-23965) == -402065981440))
(it "logical right shift 23965 >> 24" (logicalRight 24 23965 == 0))
(it "negative logical right shift 23965 >> 24" (logicalRight 24 (-23965) == 1099511627775))
(it "arithmetic right shift 23965 >> 24" (arithmeticRight 24 23965 == 0))
(it "negative arithmetic right shift 23965 >> 24" (arithmeticRight 24 (-23965) == -1))
(it "left shift 9647 << 23" (left 23 9647 == 80924901376))
(it "negative left shift 9647 << 23" (left 23 (-9647) == -80924901376))
(it "logical right shift 9647 >> 23" (logicalRight 23 9647 == 0))
(it "negative logical right shift 9647 >> 23" (logicalRight 23 (-9647) == 2199023255551))
(it "arithmetic right shift 9647 >> 23" (arithmeticRight 23 9647 == 0))
(it "negative arithmetic right shift 9647 >> 23" (arithmeticRight 23 (-9647) == -1))
(it "left shift 13329 << 22" (left 22 13329 == 55905878016))
(it "negative left shift 13329 << 22" (left 22 (-13329) == -55905878016))
(it "logical right shift 13329 >> 22" (logicalRight 22 13329 == 0))
(it "negative logical right shift 13329 >> 22" (logicalRight 22 (-13329) == 4398046511103))
(it "arithmetic right shift 13329 >> 22" (arithmeticRight 22 13329 == 0))
(it "negative arithmetic right shift 13329 >> 22" (arithmeticRight 22 (-13329) == -1))
(it "left shift 32694 << 21" (left 21 32694 == 68564287488))
(it "negative left shift 32694 << 21" (left 21 (-32694) == -68564287488))
(it "logical right shift 32694 >> 21" (logicalRight 21 32694 == 0))
(it "negative logical right shift 32694 >> 21" (logicalRight 21 (-32694) == 8796093022207))
(it "arithmetic right shift 32694 >> 21" (arithmeticRight 21 32694 == 0))
(it "negative arithmetic right shift 32694 >> 21" (arithmeticRight 21 (-32694) == -1))
(it "left shift 17805 << 20" (left 20 17805 == 18669895680))
(it "negative left shift 17805 << 20" (left 20 (-17805) == -18669895680))
(it "logical right shift 17805 >> 20" (logicalRight 20 17805 == 0))
(it "negative logical right shift 17805 >> 20" (logicalRight 20 (-17805) == 17592186044415))
(it "arithmetic right shift 17805 >> 20" (arithmeticRight 20 17805 == 0))
(it "negative arithmetic right shift 17805 >> 20" (arithmeticRight 20 (-17805) == -1))
(it "left shift 32292 << 19" (left 19 32292 == 16930308096))
(it "negative left shift 32292 << 19" (left 19 (-32292) == -16930308096))
(it "logical right shift 32292 >> 19" (logicalRight 19 32292 == 0))
(it "negative logical right shift 32292 >> 19" (logicalRight 19 (-32292) == 35184372088831))
(it "arithmetic right shift 32292 >> 19" (arithmeticRight 19 32292 == 0))
(it "negative arithmetic right shift 32292 >> 19" (arithmeticRight 19 (-32292) == -1))
(it "left shift 16841 << 18" (left 18 16841 == 4414767104))
(it "negative left shift 16841 << 18" (left 18 (-16841) == -4414767104))
(it "logical right shift 16841 >> 18" (logicalRight 18 16841 == 0))
(it "negative logical right shift 16841 >> 18" (logicalRight 18 (-16841) == 70368744177663))
(it "arithmetic right shift 16841 >> 18" (arithmeticRight 18 16841 == 0))
(it "negative arithmetic right shift 16841 >> 18" (arithmeticRight 18 (-16841) == -1))
(it "left shift 18798 << 17" (left 17 18798 == 2463891456))
(it "negative left shift 18798 << 17" (left 17 (-18798) == -2463891456))
(it "logical right shift 18798 >> 17" (logicalRight 17 18798 == 0))
(it "negative logical right shift 18798 >> 17" (logicalRight 17 (-18798) == 140737488355327))
(it "arithmetic right shift 18798 >> 17" (arithmeticRight 17 18798 == 0))
(it "negative arithmetic right shift 18798 >> 17" (arithmeticRight 17 (-18798) == -1))
(it "left shift 2511 << 16" (left 16 2511 == 164560896))
(it "negative left shift 2511 << 16" (left 16 (-2511) == -164560896))
(it "logical right shift 2511 >> 16" (logicalRight 16 2511 == 0))
(it "negative logical right shift 2511 >> 16" (logicalRight 16 (-2511) == 281474976710655))
(it "arithmetic right shift 2511 >> 16" (arithmeticRight 16 2511 == 0))
(it "negative arithmetic right shift 2511 >> 16" (arithmeticRight 16 (-2511) == -1))
(it "left shift 933 << 15" (left 15 933 == 30572544))
(it "negative left shift 933 << 15" (left 15 (-933) == -30572544))
(it "logical right shift 933 >> 15" (logicalRight 15 933 == 0))
(it "negative logical right shift 933 >> 15" (logicalRight 15 (-933) == 562949953421311))
(it "arithmetic right shift 933 >> 15" (arithmeticRight 15 933 == 0))
(it "negative arithmetic right shift 933 >> 15" (arithmeticRight 15 (-933) == -1))
(it "left shift 26861 << 14" (left 14 26861 == 440090624))
(it "negative left shift 26861 << 14" (left 14 (-26861) == -440090624))
(it "logical right shift 26861 >> 14" (logicalRight 14 26861 == 1))
(it "negative logical right shift 26861 >> 14" (logicalRight 14 (-26861) == 1125899906842622))
(it "arithmetic right shift 26861 >> 14" (arithmeticRight 14 26861 == 1))
(it "negative arithmetic right shift 26861 >> 14" (arithmeticRight 14 (-26861) == -2))
(it "left shift 13766 << 13" (left 13 13766 == 112771072))
(it "negative left shift 13766 << 13" (left 13 (-13766) == -112771072))
(it "logical right shift 13766 >> 13" (logicalRight 13 13766 == 1))
(it "negative logical right shift 13766 >> 13" (logicalRight 13 (-13766) == 2251799813685246))
(it "arithmetic right shift 13766 >> 13" (arithmeticRight 13 13766 == 1))
(it "negative arithmetic right shift 13766 >> 13" (arithmeticRight 13 (-13766) == -2))
(it "left shift 21344 << 12" (left 12 21344 == 87425024))
(it "negative left shift 21344 << 12" (left 12 (-21344) == -87425024))
(it "logical right shift 21344 >> 12" (logicalRight 12 21344 == 5))
(it "negative logical right shift 21344 >> 12" (logicalRight 12 (-21344) == 4503599627370490))
(it "arithmetic right shift 21344 >> 12" (arithmeticRight 12 21344 == 5))
(it "negative arithmetic right shift 21344 >> 12" (arithmeticRight 12 (-21344) == -6))
(it "left shift 8246 << 11" (left 11 8246 == 16887808))
(it "negative left shift 8246 << 11" (left 11 (-8246) == -16887808))
(it "logical right shift 8246 >> 11" (logicalRight 11 8246 == 4))
(it "negative logical right shift 8246 >> 11" (logicalRight 11 (-8246) == 9007199254740987))
(it "arithmetic right shift 8246 >> 11" (arithmeticRight 11 8246 == 4))
(it "negative arithmetic right shift 8246 >> 11" (arithmeticRight 11 (-8246) == -5))
(it "left shift 18044 << 10" (left 10 18044 == 18477056))
(it "negative left shift 18044 << 10" (left 10 (-18044) == -18477056))
(it "logical right shift 18044 >> 10" (logicalRight 10 18044 == 17))
(it "negative logical right shift 18044 >> 10" (logicalRight 10 (-18044) == 18014398509481966))
(it "arithmetic right shift 18044 >> 10" (arithmeticRight 10 18044 == 17))
(it "negative arithmetic right shift 18044 >> 10" (arithmeticRight 10 (-18044) == -18))
(it "left shift 11554 << 9" (left 9 11554 == 5915648))
(it "negative left shift 11554 << 9" (left 9 (-11554) == -5915648))
(it "logical right shift 11554 >> 9" (logicalRight 9 11554 == 22))
(it "negative logical right shift 11554 >> 9" (logicalRight 9 (-11554) == 36028797018963945))
(it "arithmetic right shift 11554 >> 9" (arithmeticRight 9 11554 == 22))
(it "negative arithmetic right shift 11554 >> 9" (arithmeticRight 9 (-11554) == -23))
(it "left shift 19651 << 8" (left 8 19651 == 5030656))
(it "negative left shift 19651 << 8" (left 8 (-19651) == -5030656))
(it "logical right shift 19651 >> 8" (logicalRight 8 19651 == 76))
(it "negative logical right shift 19651 >> 8" (logicalRight 8 (-19651) == 72057594037927859))
(it "arithmetic right shift 19651 >> 8" (arithmeticRight 8 19651 == 76))
(it "negative arithmetic right shift 19651 >> 8" (arithmeticRight 8 (-19651) == -77))
(it "left shift 32588 << 7" (left 7 32588 == 4171264))
(it "negative left shift 32588 << 7" (left 7 (-32588) == -4171264))
(it "logical right shift 32588 >> 7" (logicalRight 7 32588 == 254))
(it "negative logical right shift 32588 >> 7" (logicalRight 7 (-32588) == 144115188075855617))
(it "arithmetic right shift 32588 >> 7" (arithmeticRight 7 32588 == 254))
(it "negative arithmetic right shift 32588 >> 7" (arithmeticRight 7 (-32588) == -255))
(it "left shift 23333 << 6" (left 6 23333 == 1493312))
(it "negative left shift 23333 << 6" (left 6 (-23333) == -1493312))
(it "logical right shift 23333 >> 6" (logicalRight 6 23333 == 364))
(it "negative logical right shift 23333 >> 6" (logicalRight 6 (-23333) == 288230376151711379))
(it "arithmetic right shift 23333 >> 6" (arithmeticRight 6 23333 == 364))
(it "negative arithmetic right shift 23333 >> 6" (arithmeticRight 6 (-23333) == -365))
(it "left shift 13058 << 5" (left 5 13058 == 417856))
(it "negative left shift 13058 << 5" (left 5 (-13058) == -417856))
(it "logical right shift 13058 >> 5" (logicalRight 5 13058 == 408))
(it "negative logical right shift 13058 >> 5" (logicalRight 5 (-13058) == 576460752303423079))
(it "arithmetic right shift 13058 >> 5" (arithmeticRight 5 13058 == 408))
(it "negative arithmetic right shift 13058 >> 5" (arithmeticRight 5 (-13058) == -409))
(it "left shift 10754 << 4" (left 4 10754 == 172064))
(it "negative left shift 10754 << 4" (left 4 (-10754) == -172064))
(it "logical right shift 10754 >> 4" (logicalRight 4 10754 == 672))
(it "negative logical right shift 10754 >> 4" (logicalRight 4 (-10754) == 1152921504606846303))
(it "arithmetic right shift 10754 >> 4" (arithmeticRight 4 10754 == 672))
(it "negative arithmetic right shift 10754 >> 4" (arithmeticRight 4 (-10754) == -673))
(it "left shift 22538 << 3" (left 3 22538 == 180304))
(it "negative left shift 22538 << 3" (left 3 (-22538) == -180304))
(it "logical right shift 22538 >> 3" (logicalRight 3 22538 == 2817))
(it "negative logical right shift 22538 >> 3" (logicalRight 3 (-22538) == 2305843009213691134))
(it "arithmetic right shift 22538 >> 3" (arithmeticRight 3 22538 == 2817))
(it "negative arithmetic right shift 22538 >> 3" (arithmeticRight 3 (-22538) == -2818))
(it "left shift 1792 << 2" (left 2 1792 == 7168))
(it "negative left shift 1792 << 2" (left 2 (-1792) == -7168))
(it "logical right shift 1792 >> 2" (logicalRight 2 1792 == 448))
(it "negative logical right shift 1792 >> 2" (logicalRight 2 (-1792) == 4611686018427387456))
(it "arithmetic right shift 1792 >> 2" (arithmeticRight 2 1792 == 448))
(it "negative arithmetic right shift 1792 >> 2" (arithmeticRight 2 (-1792) == -448))
(it "left shift 29700 << 1" (left 1 29700 == 59400))
(it "negative left shift 29700 << 1" (left 1 (-29700) == -59400))
(it "logical right shift 29700 >> 1" (logicalRight 1 29700 == 14850))
(it "negative logical right shift 29700 >> 1" (logicalRight 1 (-29700) == 9223372036854760958))
(it "arithmetic right shift 29700 >> 1" (arithmeticRight 1 29700 == 14850))
(it "negative arithmetic right shift 29700 >> 1" (arithmeticRight 1 (-29700) == -14850))
(it "left shift 21068 << 0" (left 0 21068 == 21068))
(it "negative left shift 21068 << 0" (left 0 (-21068) == -21068))
(it "logical right shift 21068 >> 0" (logicalRight 0 21068 == 21068))
(it "negative logical right shift 21068 >> 0" (logicalRight 0 (-21068) == -21068))
(it "arithmetic right shift 21068 >> 0" (arithmeticRight 0 21068 == 21068))
(it "negative arithmetic right shift 21068 >> 0" (arithmeticRight 0 (-21068) == -21068))
(it "arithmetic right shift -1 >> 32" (arithmeticRight 32 (-1) == (-1)))
(it "arithmetic right shift -1 >> 102" (arithmeticRight 102 (-1) == (-1)))
])
]