mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-27 23:25:53 +00:00
@@ -77,11 +77,14 @@ private:
|
||||
struct SyncAsioContextTest : virtual public NoLoggerFixture {
|
||||
template <typename F>
|
||||
void
|
||||
runSpawn(F&& f)
|
||||
runSpawn(F&& f, bool allowMockLeak = false)
|
||||
{
|
||||
using namespace boost::asio;
|
||||
|
||||
testing::MockFunction<void()> call;
|
||||
if (allowMockLeak)
|
||||
testing::Mock::AllowLeak(&call);
|
||||
|
||||
spawn(ctx, [&, _ = make_work_guard(ctx)](yield_context yield) {
|
||||
f(yield);
|
||||
call.Call();
|
||||
|
||||
Reference in New Issue
Block a user