event_loop.hpp¶
file tests/io/event_loop.hpp ยท Test suite
A helper that lets the nmeasim::io tests wait for asynchronous Qt events.
Source tests/io/event_loop.hpp
Sockets, servers and timers in nmeasim::io only make progress while the Qt event loop runs, and a Catch2 test case runs outside any event loop. nmeasim::test::wait_until pumps the loop of the QCoreApplication that the suite's main creates until a condition holds, so that a test can wait for a connection, a datagram or a timer tick without sleeping for a fixed time.
Namespaces¶
| Namespace | Description |
|---|---|
nmeasim::test |
Shared helpers of the test suites: fixtures and utilities that several test files use. |
Namespace members¶
Declared or defined in this file and documented on the page of their namespace.
| Member | Description |
|---|---|
nmeasim::test::wait_until |
Pumps the Qt event loop until a condition holds or a timeout expires. |