From c255dbc3c3080c27d4c8096ff66baff3fab17788 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 20 Oct 2023 18:06:26 -0700 Subject: [PATCH] Update tests/conformance/bitwise.lua Use byteswap(-1) to validate bit32 semantics for signed integers --- tests/conformance/bitwise.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conformance/bitwise.lua b/tests/conformance/bitwise.lua index be75f015..3c432869 100644 --- a/tests/conformance/bitwise.lua +++ b/tests/conformance/bitwise.lua @@ -137,7 +137,7 @@ assert(bit32.countrz(0x7fffffff) == 0) -- testing byteswap assert(bit32.byteswap(0x10203040) == 0x40302010) assert(bit32.byteswap(0) == 0) -assert(bit32.byteswap(0xffffffff) == 0xffffffff) +assert(bit32.byteswap(-1) == 0xffffffff) --[[ This test verifies a fix in luauF_replace() where if the 4th