Changeset View
Changeset View
Standalone View
Standalone View
src/test/hash_tests.cpp
// Copyright (c) 2013-2016 The Bitcoin Core developers | // Copyright (c) 2013-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 "hash.h" | #include <hash.h> | ||||
#include "test/test_bitcoin.h" | |||||
#include "utilstrencodings.h" | |||||
#include <vector> | #include <utilstrencodings.h> | ||||
#include <test/test_bitcoin.h> | |||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <vector> | |||||
BOOST_FIXTURE_TEST_SUITE(hash_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(hash_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(murmurhash3) { | BOOST_AUTO_TEST_CASE(murmurhash3) { | ||||
#define T(expected, seed, data) \ | #define T(expected, seed, data) \ | ||||
BOOST_CHECK_EQUAL(MurmurHash3(seed, ParseHex(data)), expected) | BOOST_CHECK_EQUAL(MurmurHash3(seed, ParseHex(data)), expected) | ||||
// Test MurmurHash3 with various inputs. Of course this is retested in the | // Test MurmurHash3 with various inputs. Of course this is retested in the | ||||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |