MCPcopy Create free account
hub / github.com/argotorg/solidity / assertInitCalled

Function assertInitCalled

test/libsolutil/LazyInit.cpp:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31template<typename T>
32void assertInitCalled(LazyInit<T> lazyInit, bool target)
33{
34 bool initCalled = false;
35
36 lazyInit.init([&]{
37 initCalled = true;
38 return T();
39 });
40
41 BOOST_REQUIRE_EQUAL(initCalled, target);
42}
43
44// Take ownership to ensure that it doesn't "mutate"
45template<typename T>

Callers 2

assertNotEmptyFunction · 0.85
assertEmptyFunction · 0.85

Calls 1

initMethod · 0.80

Tested by

no test coverage detected