KiCad PCB EDA Suite
|
Simple coroutine harness that runs a coroutine that increments a number up to a pre-set limit, spitting out coroutine events as it goes. More...
Public Types | |
using | TEST_COROUTINE = COROUTINE< int, int > |
The coroutine test take ints and returns them. | |
using | EVT_HANDLER = std::function< void(const COROUTINE_TEST_EVENT &)> |
Public Member Functions | |
COROUTINE_INCREMENTING_HARNESS (EVT_HANDLER aHandler, int aCount) | |
int | CountTo (int n) |
void | Run () |
Public Attributes | |
EVT_HANDLER | m_handler |
std::unique_ptr< TEST_COROUTINE > | m_cofunc |
int | m_count |
Simple coroutine harness that runs a coroutine that increments a number up to a pre-set limit, spitting out coroutine events as it goes.
This can then be used to ensure the events are occurring as expected.
Definition at line 85 of file test_coroutine.cpp.
using COROUTINE_INCREMENTING_HARNESS::EVT_HANDLER = std::function<void( const COROUTINE_TEST_EVENT& )> |
Definition at line 93 of file test_coroutine.cpp.
using COROUTINE_INCREMENTING_HARNESS::TEST_COROUTINE = COROUTINE<int, int> |
The coroutine test take ints and returns them.
Definition at line 91 of file test_coroutine.cpp.
|
inline |
Definition at line 95 of file test_coroutine.cpp.
|
inline |
Definition at line 100 of file test_coroutine.cpp.
References m_cofunc, and m_handler.
Referenced by Run().
|
inline |
Definition at line 113 of file test_coroutine.cpp.
References CountTo(), m_cofunc, m_count, and m_handler.
Referenced by BOOST_AUTO_TEST_CASE().
std::unique_ptr<TEST_COROUTINE> COROUTINE_INCREMENTING_HARNESS::m_cofunc |
Definition at line 133 of file test_coroutine.cpp.
int COROUTINE_INCREMENTING_HARNESS::m_count |
Definition at line 134 of file test_coroutine.cpp.
Referenced by Run().
EVT_HANDLER COROUTINE_INCREMENTING_HARNESS::m_handler |
Definition at line 132 of file test_coroutine.cpp.