diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2020-07-09 01:24:17 +0200 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2020-07-09 01:24:17 +0200 |
commit | 7e2b0b5e5f55cac22fbd9237bf1c354df134802c (patch) | |
tree | 3cf37119c740ba76b874d5e6badd9e5e00cf37a7 /tests | |
parent | 931652ad9ef34c99e53007de9f92bfd5a397a219 (diff) | |
download | lua-compat-5.3-7e2b0b5e5f55cac22fbd9237bf1c354df134802c.tar.gz lua-compat-5.3-7e2b0b5e5f55cac22fbd9237bf1c354df134802c.tar.bz2 lua-compat-5.3-7e2b0b5e5f55cac22fbd9237bf1c354df134802c.zip |
Add bit32 library
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-bit32.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-bit32.lua b/tests/test-bit32.lua new file mode 100755 index 0000000..cc91e52 --- /dev/null +++ b/tests/test-bit32.lua | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/usr/bin/env lua | ||
2 | |||
3 | local bit32 = require("bit32") | ||
4 | |||
5 | |||
6 | assert(bit32.bnot(0) == 2^32-1) | ||
7 | assert(bit32.band(1, 3, 5) == 1) | ||
8 | assert(bit32.bor(1, 3, 5) == 7) | ||
9 | |||