commit e323b1d: [Test] Add test for kann load/save

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jul 3 15:07:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-03 16:05:31 +0100
URL: https://github.com/rspamd/rspamd/commit/e323b1db4b0b4ef2b6783d4d7b5f15a640882614 (HEAD -> master)

[Test] Add test for kann load/save

---
 test/lua/unit/kann.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/lua/unit/kann.lua b/test/lua/unit/kann.lua
index bb6930203..4f8185b02 100644
--- a/test/lua/unit/kann.lua
+++ b/test/lua/unit/kann.lua
@@ -30,6 +30,9 @@ context("Kann test", function()
     mini_size = 80,
   })
 
+  local ser = k:save()
+  k = kann.load(ser)
+
   for i,inp in ipairs(inputs) do
     test(string.format("Check XOR MLP %s ^ %s == %s", inp[1], inp[2], outputs[i][1]),
         function()


More information about the Commits mailing list