mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
test: Add test for TxidFromString() behavior
This commit is contained in:
parent
33af14e31b
commit
f0eeee2dc1
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue