| 30 | |
| 31 | template<typename T> |
| 32 | void 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" |
| 45 | template<typename T> |
no test coverage detected