File: test-bit32.lua

package info (click to toggle)
lua-luaossl 20220711-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,364 kB
  • sloc: ansic: 12,795; sh: 1,070; makefile: 19
file content (9 lines) | stat: -rwxr-xr-x 151 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env lua

local bit32 = require("bit32")


assert(bit32.bnot(0) == 2^32-1)
assert(bit32.band(1, 3, 5) == 1)
assert(bit32.bor(1, 3, 5) == 7)