aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-07-10 14:55:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-07-10 14:55:16 -0300
commit9a825f6bb9a141023ac519a73f6a9958c113659e (patch)
treeee89ece14decc7da9ee8d4ee7dceb8b1de9f7c25
parent941b189d98c7019c1be093bb0b709d90771b72d9 (diff)
downloadlua-9a825f6bb9a141023ac519a73f6a9958c113659e.tar.gz
lua-9a825f6bb9a141023ac519a73f6a9958c113659e.tar.bz2
lua-9a825f6bb9a141023ac519a73f6a9958c113659e.zip
In tests of opcodes, avoid coercion in bitwise operation
-rw-r--r--testes/code.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/testes/code.lua b/testes/code.lua
index e39c62ad..1a01c4a2 100644
--- a/testes/code.lua
+++ b/testes/code.lua
@@ -239,7 +239,7 @@ checkI(function () return ~~-1024.0 end, -1024)
239checkI(function () return ((100 << 6) << -4) >> 2 end, 100) 239checkI(function () return ((100 << 6) << -4) >> 2 end, 100)
240 240
241-- borders around MAXARG_sBx ((((1 << 17) - 1) >> 1) == 65535) 241-- borders around MAXARG_sBx ((((1 << 17) - 1) >> 1) == 65535)
242local sbx = ((1 << "17") - 1) >> 1 -- avoid folding 242local a = 17; local sbx = ((1 << a) - 1) >> 1 -- avoid folding
243checkI(function () return 65535 end, sbx) 243checkI(function () return 65535 end, sbx)
244checkI(function () return -65535 end, -sbx) 244checkI(function () return -65535 end, -sbx)
245checkI(function () return 65536 end, sbx + 1) 245checkI(function () return 65536 end, sbx + 1)