aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Harding <tomh@thinlink.com>2014-06-25 16:21:29 -0700
committerTom Harding <tomh@thinlink.com>2014-06-27 07:54:21 -0700
commit8fbf03995df9a2003be603be1a930bc3373d56e0 (patch)
treee726d2f0b835114c4aa5089813a60ed06971f46a /src/test
parent62599373883a66a958136f48ab0e2b826e3d5bf8 (diff)
CBloomFilter::clear() method
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bloom_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index b56d998be2..5c6c7d8588 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -45,6 +45,10 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
expected[i] = (char)vch[i];
BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
+
+ BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+ filter.clear();
+ BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
}
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)