Bugfix nagative-number lshift() bit overflow

This commit is contained in:
murase_syuka
2015-11-18 21:37:17 +09:00
parent 557ab3472a
commit ef95dcd390
2 changed files with 19 additions and 3 deletions
+3
View File
@@ -150,6 +150,9 @@ assert('Integer#<<', '15.2.8.3.12') do
# Left Shift by 31 is bitShift overflow to SignedInt
assert_equal 2147483648, 1 << 31
# -3 Left Shift by 30 is bitShift overflow to SignedInt
assert_equal -3221225472, -3 << 30
end
assert('Integer#>>', '15.2.8.3.13') do