carb::assert::getFailureCount

Defined in carb/assert/AssertUtils.h

inline uint64_t carb::assert::getFailureCount()

Retrieves the current assertion failure count for the calling process.

Returns

The total number of assertions that have failed in the calling process. For most normally functioning apps, this should always be zero. This can be used in unit tests to determine whether some ‘safe’ assertions failed without requiring manual verification or user input. When used in unit tests, this should be combined with carbAssertUseBreakpoint() to ensure the normal execution isn’t stopped if an assertion fails.