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

Function TEST_F

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

* @brief Test Task default constructor behavior * * TESTS: Task() * * PURPOSE: Verify that a Task created with the default constructor initializes * all properties to safe default values and is in a predictable state. * * EXPECTATIONS: * - Task should be disabled by default (safety) * - Interval should be 0 (no automatic execution) * - Iterations should be 0 (won't execute) * - RunCount

Source from the content-addressed store, hash-verified

375 * execute unexpectedly. This is critical for safe initialization patterns.
376 */
377TEST_F(SchedulerThoroughTest, TaskDefaultConstructor) {
378 Task task;
379
380 // Verify task is in safe, inert state after default construction
381 EXPECT_FALSE(task.isEnabled()); // Should not execute without explicit enable
382 EXPECT_EQ(task.getInterval(), 0); // No automatic timing
383 EXPECT_EQ(task.getIterations(), 0); // Won't execute without iterations set
384 EXPECT_EQ(task.getRunCounter(), 0); // No executions yet
385}
386
387/**
388 * @brief Test Task parameterized constructor with all options

Callers

nothing calls this directly

Calls 15

delayFunction · 0.85
millisFunction · 0.85
getTestOutputCountFunction · 0.85
getTestOutputFunction · 0.85
clearTestOutputFunction · 0.85
isEnabledMethod · 0.80
getIntervalMethod · 0.80
getIterationsMethod · 0.80
getRunCounterMethod · 0.80
disableMethod · 0.80
enableIfNotMethod · 0.80
restartMethod · 0.80

Tested by

no test coverage detected