diff options
author | Tom Harding <tomh@thinlink.com> | 2014-07-21 11:50:07 -0700 |
---|---|---|
committer | Tom Harding <tomh@thinlink.com> | 2014-07-21 11:50:07 -0700 |
commit | 9c347313f7f504d602a9d744f1ad7aee4e3d6f9a (patch) | |
tree | d552cdf51b9cf2ccad1e92e594eb08539473f104 /src/test | |
parent | cdb4193a317e1360be806eed9838010e642b6388 (diff) |
CBloomFilter::clear() method
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/bloom_tests.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp index 69de3b5bb1..2cdafa4bdd 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) |