aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-08 11:46:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-08 11:46:44 +0100
commita11b0abee850775231485d478a8f6e0d963ff6d1 (patch)
tree4ca18faa72a91ad7c83ffca28b927cdabaeb9c80 /test/lua
parentf0248768649c6fd2f562d8e620ed046dd19e92a7 (diff)
downloadrspamd-a11b0abee850775231485d478a8f6e0d963ff6d1.tar.gz
rspamd-a11b0abee850775231485d478a8f6e0d963ff6d1.zip
Add siphash testing.
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/unit/siphash.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lua/unit/siphash.lua b/test/lua/unit/siphash.lua
new file mode 100644
index 000000000..62a30b01a
--- /dev/null
+++ b/test/lua/unit/siphash.lua
@@ -0,0 +1,14 @@
+-- Test siphash routines
+
+context("Siphash check functions", function()
+ local ffi = require("ffi")
+ ffi.cdef[[
+ size_t siphash24_test(void);
+ ]]
+
+ test("Siphash test vectors", function()
+ local res = ffi.C.siphash24_test()
+
+ assert_not_equal(res, 0)
+ end)
+end) \ No newline at end of file