aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compat53/tests/test-bit32.lua
diff options
context:
space:
mode:
authorGravatar Andrew D. France 2025-07-14 17:51:23 -0500
committerGravatar Andrew D. France 2025-07-14 17:51:23 -0500
commit6f8c0f3abda585b3ee1d87e3b8e19c729b52b4a6 (patch)
tree8361fd3812991d43adca5b5c81029486aa955478 /lib/compat53/tests/test-bit32.lua
parentv0.3.2 (diff)
Added compat53 support and fixed bugged non-interactive mode
Diffstat (limited to 'lib/compat53/tests/test-bit32.lua')
-rwxr-xr-xlib/compat53/tests/test-bit32.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compat53/tests/test-bit32.lua b/lib/compat53/tests/test-bit32.lua
new file mode 100755
index 0000000..a408b7d
--- /dev/null
+++ b/lib/compat53/tests/test-bit32.lua
@@ -0,0 +1,10 @@
+#!/usr/bin/env lua
+
+local bit32 = require("bit32")
+
+
+assert(bit32.bnot(0) == 2^32-1)
+assert(bit32.bnot(-1) == 0)
+assert(bit32.band(1, 3, 5) == 1)
+assert(bit32.bor(1, 3, 5) == 7)
+