SDFM_CONTROL/EFC_PlatformC28x_Test/AsyncRunnerTest.hh

49 lines
824 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* AsyncRunnerTest.hh
*
* Created on: 21 мая 2024 г.
* Author: leonid
*/
#ifndef ASYNCRUNNERTEST_HH_
#define ASYNCRUNNERTEST_HH_
#include "UnitTestInterface.hh"
#include "AsyncRunnerInterface.hh"
namespace umlib { namespace tests {
class AsyncRunnerTest : public UnitTestInterface {
AsyncRunnerInterface & runner;
struct OnceCallTask : public TaskInterface {
int counter;
void reset();
void do_task();
};
public:
AsyncRunnerTest( AsyncRunnerInterface & runner );
void run( TestResult & result );
void test_once_call_on_zero( TestResult & result );
void test_once_call_on_one( TestResult & result );
void test_ran_after_run( TestResult & result );
void test_cancel( TestResult & result );
};
}}
#endif /* ASYNCRUNNERTEST_HH_ */