MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / SelfTest

Method SelfTest

src/test/coins_tests.cpp:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 CCoinsViewCacheTest(CCoinsView* base) : CCoinsViewCache(base) {}
67
68 void SelfTest() const
69 {
70 // Manually recompute the dynamic usage of the whole data, and compare it.
71 size_t ret = memusage::DynamicUsage(cacheCoins);
72 for (CCoinsMap::iterator it = cacheCoins.begin(); it != cacheCoins.end(); it++) {
73 ret += it->second.coins.DynamicMemoryUsage();
74 }
75 BOOST_CHECK_EQUAL(DynamicMemoryUsage(), ret);
76 }
77
78};
79

Callers 1

BOOST_FOREACHFunction · 0.80

Calls 4

DynamicUsageFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
DynamicMemoryUsageMethod · 0.45

Tested by

no test coverage detected