Changeset View
Changeset View
Standalone View
Standalone View
src/test/cashaddrenc_tests.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | private: | ||||
bool isScript; | bool isScript; | ||||
}; | }; | ||||
// Map all possible size bits in the version to the expected size of the | // Map all possible size bits in the version to the expected size of the | ||||
// hash in bytes. | // hash in bytes. | ||||
const std::array<std::pair<uint8_t, uint32_t>, 8> valid_sizes = { | const std::array<std::pair<uint8_t, uint32_t>, 8> valid_sizes = { | ||||
{{0, 20}, {1, 24}, {2, 28}, {3, 32}, {4, 40}, {5, 48}, {6, 56}, {7, 64}}}; | {{0, 20}, {1, 24}, {2, 28}, {3, 32}, {4, 40}, {5, 48}, {6, 56}, {7, 64}}}; | ||||
} // anon ns | } // namespace | ||||
BOOST_FIXTURE_TEST_SUITE(cashaddrenc_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(cashaddrenc_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(encode_decode_all_sizes) { | BOOST_AUTO_TEST_CASE(encode_decode_all_sizes) { | ||||
FastRandomContext rand(true); | FastRandomContext rand(true); | ||||
const CChainParams ¶ms = Params(CBaseChainParams::MAIN); | const CChainParams ¶ms = Params(CBaseChainParams::MAIN); | ||||
for (auto ps : valid_sizes) { | for (auto ps : valid_sizes) { | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |