|
LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
Google Test suite for the Thread module (JunoThread_Init and vtable dispatch). More...

Data Structures | |
| class | ThreadModuleTest |
Functions | |
| static JUNO_STATUS_T | TestStop (JUNO_THREAD_ROOT_T *ptRoot) |
| static JUNO_STATUS_T | TestJoin (JUNO_THREAD_ROOT_T *ptRoot) |
| static JUNO_STATUS_T | TestFree (JUNO_THREAD_ROOT_T *ptRoot) |
| static void | TestFailureHandler (JUNO_STATUS_T, const char *, void *) |
| TEST_F (ThreadModuleTest, Init_NullRoot_ReturnsNullptrError) | |
| TEST_F (ThreadModuleTest, Init_NullApi_ReturnsNullptrError) | |
| TEST_F (ThreadModuleTest, Init_HappyPath_WiresVtableAndClearsState) | |
| TEST_F (ThreadModuleTest, Init_NullFailureHandler_IsAccepted) | |
| TEST_F (ThreadModuleTest, Init_StoresFailureHandler) | |
| TEST_F (ThreadModuleTest, Stop_DispatchesViaVtable_SetsBStopTrue) | |
| TEST_F (ThreadModuleTest, Join_DispatchesViaVtable) | |
| TEST_F (ThreadModuleTest, Free_DispatchesViaVtable) | |
| TEST_F (ThreadModuleTest, BStop_ReadableAfterStop_TrueViaRootPointer) | |
| TEST_F (ThreadModuleTest, Stop_WhenVtableReturnsError_PropagatesExactStatus) | |
| TEST_F (ThreadModuleTest, Join_WhenVtableReturnsError_PropagatesExactStatus) | |
| TEST_F (ThreadModuleTest, Free_WhenVtableReturnsError_PropagatesExactStatus) | |
| TEST_F (ThreadModuleTest, FullLifecycle_StopJoinFree_StateConsistent) | |
Variables | |
| static bool | s_bStopCalled = false |
| static bool | s_bJoinCalled = false |
| static bool | s_bFreeCalled = false |
| static bool | s_bStopFail = false |
| static bool | s_bJoinFail = false |
| static bool | s_bFreeFail = false |
| static JUNO_STATUS_T | s_tStopFailStatus = JUNO_STATUS_ERR |
| static JUNO_STATUS_T | s_tJoinFailStatus = JUNO_STATUS_ERR |
| static JUNO_STATUS_T | s_tFreeFailStatus = JUNO_STATUS_ERR |
| static const JUNO_THREAD_API_T | s_tTestApi = { TestStop, TestJoin, TestFree } |
| static int | s_iFhCallCount = 0 |
Google Test suite for the Thread module (JunoThread_Init and vtable dispatch).
Covers requirements: REQ-THREAD-003, REQ-THREAD-005, REQ-THREAD-006, REQ-THREAD-007, REQ-THREAD-009, REQ-THREAD-010, REQ-THREAD-012, REQ-THREAD-013.
Test doubles use a vtable-injected fake JUNO_THREAD_API_T covering the {Stop, Join, Free} dispatch slots. No OS thread API (pthreads) is called from this file. No dynamic allocation is used.
| TEST_F | ( | ThreadModuleTest | , |
| BStop_ReadableAfterStop_TrueViaRootPointer | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Free_DispatchesViaVtable | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Free_WhenVtableReturnsError_PropagatesExactStatus | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| FullLifecycle_StopJoinFree_StateConsistent | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Init_HappyPath_WiresVtableAndClearsState | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Init_NullApi_ReturnsNullptrError | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Init_NullFailureHandler_IsAccepted | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Init_NullRoot_ReturnsNullptrError | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Init_StoresFailureHandler | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Join_DispatchesViaVtable | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Join_WhenVtableReturnsError_PropagatesExactStatus | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Stop_DispatchesViaVtable_SetsBStopTrue | |||
| ) |
| TEST_F | ( | ThreadModuleTest | , |
| Stop_WhenVtableReturnsError_PropagatesExactStatus | |||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |