class TestLoop

Defined at line 17 of file ../../src/lib/testing/loop_fixture/test_loop.h

Protected Methods

void TestLoop ()

Defined at line 9 of file ../../src/lib/testing/loop_fixture/test_loop.cc

void ~TestLoop ()

Defined at line 11 of file ../../src/lib/testing/loop_fixture/test_loop.cc

async_dispatcher_t * dispatcher ()

Defined at line 22 of file ../../src/lib/testing/loop_fixture/test_loop.h

zx::time Now ()

Returns the current fake clock time.

Defined at line 25 of file ../../src/lib/testing/loop_fixture/test_loop.h

bool RunLoopUntil (zx::time deadline)

Dispatches all waits and all tasks posted to the message loop with

deadlines up until |deadline|, progressively advancing the fake clock.

Returns true iff any tasks or waits were invoked during the run.

Defined at line 30 of file ../../src/lib/testing/loop_fixture/test_loop.h

bool RunLoopFor (zx::duration duration)

Dispatches all waits and all tasks posted to the message loop with

deadlines up until |duration| from the current time, progressively

advancing the fake clock.

Returns true iff any tasks or waits were invoked during the run.

Defined at line 36 of file ../../src/lib/testing/loop_fixture/test_loop.h

bool RunLoopUntilIdle ()

Dispatches all waits and all tasks posted to the message loop with

deadlines up until the current time, progressively advancing the fake

clock.

Returns true iff any tasks or waits were invoked during the run.

Defined at line 42 of file ../../src/lib/testing/loop_fixture/test_loop.h

void RunLoopRepeatedlyFor (zx::duration increment)

Repeatedly runs the loop by |increment| until nothing further is left to

dispatch.

Defined at line 46 of file ../../src/lib/testing/loop_fixture/test_loop.h

void QuitLoop ()

Quits the message loop. If called while running, it will immediately

exit and dispatch no further tasks or waits; if called before running,

then next call to run will immediately exit. Further calls to run will

continue to dispatch.

Defined at line 52 of file ../../src/lib/testing/loop_fixture/test_loop.h

fit::closure QuitLoopClosure ()

A callback that quits the message loop when called.

Defined at line 55 of file ../../src/lib/testing/loop_fixture/test_loop.h

async::TestLoop & test_loop ()

Accessor for the underlying TestLoop.

Defined at line 60 of file ../../src/lib/testing/loop_fixture/test_loop.h