MCPcopy Create free account
hub / github.com/AshampooSystems/boden / TEST

Function TEST

tests/boden/testTimer.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 };
35
36 TEST(Timer, SingleShot)
37 {
38 TriggerConsumer tc;
39
40 Timer t;
41 t.interval = 10ms;
42
43 t.onTriggered() += [&tc]() { tc.trigger(); };
44 t.start();
45
46 bool result = tc.wait();
47 EXPECT_EQ(result, true);
48 }
49
50 TEST(Timer, Repeating)
51 {

Callers

nothing calls this directly

Calls 4

triggerMethod · 0.80
startMethod · 0.45
waitMethod · 0.45
waitForMethod · 0.45

Tested by

no test coverage detected