57 #include "Mockftask.h"
58 #include "Mockftask_cfg.h"
59 #include "Mockportmacro.h"
60 #include "Mockqueue.h"
67 TEST_FILE("os_freertos.c")
83 FTSK_CreateQueues_Expect();
84 FTSK_CreateTasks_Expect();
92 OS_TIMER_s testTimerExpected = {0u, 0u, 0u, 0u, 0u, 0u, 0u};
100 for (uint8_t i = 0; i < 9; i++) {
133 testTimerExpected.
timer_h = 0u;
134 testTimerExpected.
timer_d = 0u;
152 testTimerExpected.
timer_h = 0u;
153 testTimerExpected.
timer_d = 0u;
171 testTimerExpected.
timer_h = 1u;
172 testTimerExpected.
timer_d = 0u;
190 testTimerExpected.
timer_h = 0u;
191 testTimerExpected.
timer_d = 1u;
197 OS_TIMER_s testTimerExpected = {0u, 0u, 0u, 0u, 0u, 0u, 0u};
214 testTimerExpected.
timer_h = 0u;
215 testTimerExpected.
timer_d = 0u;
221 xTaskGetTickCount_ExpectAndReturn(0u);
224 xTaskGetTickCount_ExpectAndReturn(100u);
227 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
230 xTaskGetTickCount_ExpectAndReturn(0u);
233 xTaskGetTickCount_ExpectAndReturn(0u);
236 xTaskGetTickCount_ExpectAndReturn(0u);
242 xTaskGetTickCount_ExpectAndReturn(0u);
245 xTaskGetTickCount_ExpectAndReturn(0u);
251 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
254 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
260 xTaskGetTickCount_ExpectAndReturn(0u);
267 xTaskGetTickCount_ExpectAndReturn(0u);
270 xTaskGetTickCount_ExpectAndReturn(1u);
273 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
bool OS_CheckTimeHasPassed(uint32_t oldTimeStamp_ms, uint32_t timeToPass_ms)
This function checks if timeToPass has passed since the last timestamp to now.
STD_RETURN_TYPE_e OS_CheckTimeHasPassedSelfTest(void)
Does a self check if the OS_CheckTimeHasPassedWithTimestamp works as expected.
void OS_InitializeOperatingSystem(void)
Initialization the RTOS interface.
OS_TIMER_s * TEST_OS_GetOsTimer()
void OS_IncrementTimer(void)
Increments the system timer os_timer.
volatile OS_BOOT_STATE_e os_boot
Declaration of the OS wrapper interface.
void testOS_CheckTimeHasPassedTimestampAroundMax1ms(void)
void testOS_CheckTimeHasPassedTimestampAtMax1ms(void)
void testOS_CheckTimeHasPassedSelfTestSuccessful(void)
static OS_TIMER_s * test_timer
void testOSTaskInitCallsFTSKFunctions(void)
void testOS_TriggerTimerOverflow(void)
void testOS_CheckTimeHasPassed1ms(void)
void testOS_CheckTimeHasPassedUINT32_MAXms(void)
void testOS_IncrementTimer(void)
void testOS_CheckTimeHasPassedNoTime(void)