diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-07-23 14:06:11 +0200 |
---|---|---|
committer | Hodlinator <172445034+hodlinator@users.noreply.github.com> | 2024-07-23 14:08:46 +0200 |
commit | f0eeee2dc1329b0647df09bea9ccc0395bb82698 (patch) | |
tree | 7b2aee828f5dc9b0ae01cae15009d1be4451bdbc /src/test/transaction_tests.cpp | |
parent | 33af14e31b9fa436029a2bb8c2b11de8feb32f86 (diff) |
test: Add test for TxidFromString() behavior
Diffstat (limited to 'src/test/transaction_tests.cpp')
-rw-r--r-- | src/test/transaction_tests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index a7fda5865c..d10b180111 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -1028,4 +1028,12 @@ BOOST_AUTO_TEST_CASE(test_IsStandard) } } +BOOST_AUTO_TEST_CASE(test_TxidFromString) +{ + // TxidFromString currently ignores string_view length and reads the whole + // string, not the specified substring. + BOOST_CHECK_EQUAL(TxidFromString(std::string_view("ABCD1234", 4)).ToString(), + "00000000000000000000000000000000000000000000000000000000abcd1234"); +} + BOOST_AUTO_TEST_SUITE_END() |