aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2024-03-01 17:22:29 +0000
committerMatthew Wild <mwild1@gmail.com>2024-03-01 17:22:29 +0000
commit876162b9cfe58a6e2df12006263d344d80531332 (patch)
treea5f36c7014cab5a4b5dfa9032eb497a5ccd8ef59 /spec
parent36a958306911d054086b0be3a15b5212a163525d (diff)
downloadprosody-876162b9cfe58a6e2df12006263d344d80531332.tar.gz
prosody-876162b9cfe58a6e2df12006263d344d80531332.zip
util.bit53: Add bnot() method
Diffstat (limited to 'spec')
-rw-r--r--spec/util_bitcompat_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/util_bitcompat_spec.lua b/spec/util_bitcompat_spec.lua
index 34a87f5b..99642821 100644
--- a/spec/util_bitcompat_spec.lua
+++ b/spec/util_bitcompat_spec.lua
@@ -24,4 +24,8 @@ describe("util.bitcompat", function ()
it("lshift works", function ()
assert.equal(0xFF00, bit.lshift(0xFF, 8));
end);
+
+ it("bnot works", function ()
+ assert.equal(0x0000FF00, bit.band(0xFFFFFFFF, bit.bnot(0xFFFF00FF)));
+ end);
end);