57 #include "Mockftask.h"
58 #include "Mockftask_cfg.h"
59 #include "Mockportmacro.h"
60 #include "Mockqueue.h"
71 TEST_FILE("os_freertos.c")
87 FTSK_CreateQueues_Expect();
88 FTSK_CreateTasks_Expect();
96 OS_TIMER_s testTimerExpected = {0u, 0u, 0u, 0u, 0u, 0u, 0u};
98 RTC_IncrementSystemTime_Expect();
105 for (uint8_t i = 0; i < 9; i++) {
106 RTC_IncrementSystemTime_Expect();
117 RTC_IncrementSystemTime_Expect();
133 RTC_IncrementSystemTime_Expect();
141 testTimerExpected.
timer_h = 0u;
142 testTimerExpected.
timer_d = 0u;
153 RTC_IncrementSystemTime_Expect();
161 testTimerExpected.
timer_h = 0u;
162 testTimerExpected.
timer_d = 0u;
173 RTC_IncrementSystemTime_Expect();
181 testTimerExpected.
timer_h = 1u;
182 testTimerExpected.
timer_d = 0u;
193 RTC_IncrementSystemTime_Expect();
201 testTimerExpected.
timer_h = 0u;
202 testTimerExpected.
timer_d = 1u;
208 OS_TIMER_s testTimerExpected = {0u, 0u, 0u, 0u, 0u, 0u, 0u};
218 RTC_IncrementSystemTime_Expect();
226 testTimerExpected.
timer_h = 0u;
227 testTimerExpected.
timer_d = 0u;
233 xTaskGetTickCount_ExpectAndReturn(0u);
236 xTaskGetTickCount_ExpectAndReturn(100u);
239 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
242 xTaskGetTickCount_ExpectAndReturn(0u);
245 xTaskGetTickCount_ExpectAndReturn(0u);
248 xTaskGetTickCount_ExpectAndReturn(0u);
254 xTaskGetTickCount_ExpectAndReturn(0u);
257 xTaskGetTickCount_ExpectAndReturn(0u);
263 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
266 xTaskGetTickCount_ExpectAndReturn(UINT32_MAX);
272 xTaskGetTickCount_ExpectAndReturn(0u);
279 xTaskGetTickCount_ExpectAndReturn(0u);
282 xTaskGetTickCount_ExpectAndReturn(1u);
285 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)