MCPcopy Create free account
hub / github.com/ETLCPP/etl / TEST

Function TEST

test/test_callback_timer.cpp:148–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 {
147 //*************************************************************************
148 TEST(callback_timer_too_many_timers)
149 {
150 etl::callback_timer<2> timer_controller;
151
152 etl::timer::id::type id1 = timer_controller.register_timer(member_callback, 37, etl::timer::mode::Single_Shot);
153 etl::timer::id::type id2 = timer_controller.register_timer(free_function_callback, 23, etl::timer::mode::Single_Shot);
154 etl::timer::id::type id3 = timer_controller.register_timer(free_callback2, 11, etl::timer::mode::Single_Shot);
155
156 CHECK(id1 != etl::timer::id::NO_TIMER);
157 CHECK(id2 != etl::timer::id::NO_TIMER);
158 CHECK(id3 == etl::timer::id::NO_TIMER);
159
160 timer_controller.clear();
161 id3 = timer_controller.register_timer(free_callback2, 11, etl::timer::mode::Single_Shot);
162 CHECK(id3 != etl::timer::id::NO_TIMER);
163 }
164
165 //*************************************************************************
166 TEST(callback_timer_one_shot)

Callers

nothing calls this directly

Calls 15

register_timerMethod · 0.45
clearMethod · 0.45
startMethod · 0.45
enableMethod · 0.45
tickMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
set_periodMethod · 0.45
unregister_timerMethod · 0.45
stopMethod · 0.45
is_runningMethod · 0.45
set_controllerMethod · 0.45

Tested by

no test coverage detected