Changeset View
Changeset View
Standalone View
Standalone View
src/test/bloom_tests.cpp
// Copyright (c) 2012-2016 The Bitcoin Core developers | // Copyright (c) 2012-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "bloom.h" | #include <bloom.h> | ||||
#include "base58.h" | #include <base58.h> | ||||
#include "clientversion.h" | #include <clientversion.h> | ||||
#include "key.h" | #include <key.h> | ||||
#include "merkleblock.h" | #include <merkleblock.h> | ||||
#include "random.h" | #include <random.h> | ||||
#include "serialize.h" | #include <serialize.h> | ||||
#include "streams.h" | #include <streams.h> | ||||
#include "test/test_bitcoin.h" | #include <uint256.h> | ||||
#include "uint256.h" | #include <util.h> | ||||
#include "util.h" | #include <utilstrencodings.h> | ||||
#include "utilstrencodings.h" | |||||
#include <vector> | #include <test/test_bitcoin.h> | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <vector> | |||||
BOOST_FIXTURE_TEST_SUITE(bloom_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(bloom_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize) { | BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize) { | ||||
CBloomFilter filter(3, 0.01, 0, BLOOM_UPDATE_ALL); | CBloomFilter filter(3, 0.01, 0, BLOOM_UPDATE_ALL); | ||||
filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")); | filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")); | ||||
BOOST_CHECK_MESSAGE( | BOOST_CHECK_MESSAGE( | ||||
filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), | filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), | ||||
▲ Show 20 Lines • Show All 1,099 Lines • Show Last 20 Lines |