MCPcopy Create free account
hub / github.com/arkhipenko/TaskScheduler / SchedulerThoroughTest

Class SchedulerThoroughTest

tests/test-scheduler-basic-thorough.cpp:333–356  ·  view source on GitHub ↗

Test fixture for comprehensive scheduler testing

Source from the content-addressed store, hash-verified

331
332// Test fixture for comprehensive scheduler testing
333class SchedulerThoroughTest : public ::testing::Test {
334protected:
335 void SetUp() override {
336 clearTestOutput();
337 callback_counter = 0;
338 onEnable_called = false;
339 onDisable_called = false;
340 millis(); // Initialize timing
341 }
342
343 void TearDown() override {
344 clearTestOutput();
345 callback_counter = 0;
346 onEnable_called = false;
347 onDisable_called = false;
348 }
349
350 bool runSchedulerUntil(Scheduler& ts, std::function<bool()> condition, unsigned long timeout_ms = 1000) {
351 return waitForCondition([&]() {
352 ts.execute();
353 return condition();
354 }, timeout_ms);
355 }
356};
357
358// ================== TASK CONSTRUCTOR TESTS ==================
359

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected