From 9d54fb9152fd9b05fa630dafd1acc1bc36c006c2 Mon Sep 17 00:00:00 2001 From: guruhegde Date: Thu, 5 Apr 2018 20:06:37 +0200 Subject: [PATCH] [DiceCoeffWeight] Add serialisation and unserialisation tests --- xapian-core/tests/api_nodb.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xapian-core/tests/api_nodb.cc b/xapian-core/tests/api_nodb.cc index 73fcc40b6..6863c78b1 100644 --- a/xapian-core/tests/api_nodb.cc +++ b/xapian-core/tests/api_nodb.cc @@ -414,6 +414,12 @@ DEFINE_TESTCASE(weight1, !backend) { TEST_EQUAL(unigramlmweight.serialise(), wt->serialise()); delete wt; + Xapian::DiceCoeffWeight dicecoeffweight; + TEST_EQUAL(dicecoeffweight.name(), "Xapian::DiceCoeffWeight"); + wt = Xapian::DiceCoeffWeight().unserialise(dicecoeffweight.serialise()); + TEST_EQUAL(dicecoeffweight.serialise(), wt->serialise()); + delete wt; + return true; } -- 2.11.4.GIT