Skip to content

Commit

Permalink
MERGE-FIX: Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose committed May 21, 2019
1 parent a39bad4 commit 3a01200
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ endif
if ENABLE_WALLET
BITCOIN_TESTS += \
wallet/test/db_tests.cpp \
wallet/test/psbt_wallet_tests.cpp \
wallet/test/wallet_tests.cpp \
wallet/test/wallet_crypto_tests.cpp \
wallet/test/coinselector_tests.cpp \
wallet/test/init_tests.cpp
# ELEMENTS: disable PSBT test
# wallet/test/psbt_wallet_tests.cpp

BITCOIN_TEST_SUITE += \
wallet/test/wallet_test_fixture.cpp \
Expand Down
4 changes: 3 additions & 1 deletion src/test/bech32_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ BOOST_AUTO_TEST_CASE(bip173_testvectors_invalid)
BOOST_AUTO_TEST_CASE(bech32_polymod_sanity)
{
std::vector<unsigned char> data(40);
GetRandBytes(data.data(), data.size());
// GetRandBytes only allows 32 bytes at a time
GetRandBytes(data.data(), 32);
GetRandBytes(data.data() + 32, data.size() - 32);

std::vector<unsigned char> base32;
ConvertBits<8, 5, true>([&](unsigned char c) { base32.push_back(c); }, data.begin(), data.end());
Expand Down
4 changes: 3 additions & 1 deletion src/test/blech32_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ BOOST_FIXTURE_TEST_SUITE(blech32_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(blech32_polymod_sanity)
{
std::vector<unsigned char> data(40);
GetRandBytes(data.data(), data.size());
// GetRandBytes only allows 32 bytes at a time
GetRandBytes(data.data(), 32);
GetRandBytes(data.data() + 32, data.size() - 32);

std::vector<unsigned char> base32;
ConvertBits<8, 5, true>([&](unsigned char c) { base32.push_back(c); }, data.begin(), data.end());
Expand Down

0 comments on commit 3a01200

Please sign in to comment.