File isotp_test_support.h¶
FileList > tests > unit > isotp_test_support.h
Go to the source code of this file
Test support utilities and mocks. More...
#include <cstdint>#include <cstddef>#include <cstring>#include "isotp.h"
Classes¶
| Type | Name |
|---|---|
| struct | MockCanState Mock CAN state structure for testing purposes. |
Public Attributes¶
| Type | Name |
|---|---|
| MockCanState | g_can_state Global state for CAN send mock. |
| int | g_debug_call_count Global state for counting debug calls. |
| uint32_t | g_now_us Global state for current time in microseconds. |
Public Functions¶
| Type | Name |
|---|---|
| void | reset_mocks () Reset all mock state to initial values. |
Detailed Description¶
Declares mock state and helper APIs for unit tests.
Public Attributes Documentation¶
variable g_can_state¶
Global state for CAN send mock.
MockCanState g_can_state;
variable g_debug_call_count¶
Global state for counting debug calls.
int g_debug_call_count;
variable g_now_us¶
Global state for current time in microseconds.
uint32_t g_now_us;
Public Functions Documentation¶
function reset_mocks¶
Reset all mock state to initial values.
void reset_mocks ()
Should be called before each test to avoid cross-test leakage.
Reset all mock state to initial values.
The documentation for this class was generated from the following file tests/unit/isotp_test_support.h