| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // ====================================================================== | ||
| 2 | // \title stub_assert_hook.cpp | ||
| 3 | // \brief Fw_AssertHook implementation with no formatting and no output | ||
| 4 | // | ||
| 5 | // For targets without a console or without stdio. Assertion failures | ||
| 6 | // still dispatch to a registered Fw::AssertHook; without one, the | ||
| 7 | // message is dropped and terminateOnAssert() is called. | ||
| 8 | // ====================================================================== | ||
| 9 | #include <Fw/Types/assert_hook.hpp> | ||
| 10 | #include <cassert> | ||
| 11 | |||
| 12 | 3 | void Fw::formatAssertMessage(FILE_NAME_ARG file, | |
| 13 | FwSizeType lineNo, | ||
| 14 | FwSizeType numArgs, | ||
| 15 | FwAssertArgType arg1, | ||
| 16 | FwAssertArgType arg2, | ||
| 17 | FwAssertArgType arg3, | ||
| 18 | FwAssertArgType arg4, | ||
| 19 | FwAssertArgType arg5, | ||
| 20 | FwAssertArgType arg6, | ||
| 21 | CHAR* destBuffer, | ||
| 22 | FwSizeType buffSize) { | ||
| 23 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
|
3 | if ((destBuffer != nullptr) && (buffSize > 0)) { |
| 24 | 1 | destBuffer[0] = '\0'; | |
| 25 | } | ||
| 26 | 3 | } | |
| 27 | |||
| 28 | 1 | void Fw::printAssertMessage(const CHAR* msg) {} | |
| 29 | |||
| 30 | ✗ | void Fw::terminateOnAssert() { | |
| 31 | ✗ | assert(false); | |
| 32 | } | ||
| 33 |