MCPcopy Create free account
hub / github.com/ElementsProject/elements / CheckSpendCoins

Function CheckSpendCoins

src/test/coins_tests.cpp:683–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683static void CheckSpendCoins(CAmount base_value, CAmount cache_value, CAmount expected_value, char cache_flags, char expected_flags)
684{
685 SingleEntryCacheTest test(base_value, cache_value, cache_flags);
686 test.cache.SpendCoin(OUTPOINT.second);
687 test.cache.SelfTest();
688
689 CAmount result_value;
690 char result_flags;
691 GetCoinsMapEntry(test.cache.map(), result_value, result_flags);
692 BOOST_CHECK_EQUAL(result_value, expected_value);
693 BOOST_CHECK_EQUAL(result_flags, expected_flags);
694};
695
696BOOST_AUTO_TEST_CASE(ccoins_spend)
697{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

GetCoinsMapEntryFunction · 0.85
SpendCoinMethod · 0.80
SelfTestMethod · 0.80

Tested by

no test coverage detected