#include #include #include #include namespace { bool gCallbackInvoked = false; bool TestFailureCallback(const char*, const char*, int, const char*, const char*, va_list) { gCallbackInvoked = true; return false; // Don't break into the debugger. } } // namespace int main() { EA::Assert::SetFailureCallback(&TestFailureCallback); EA_ASSERT(1 == 2); // Deliberately false, to exercise the failure callback. if (!gCallbackInvoked) { std::fprintf(stderr, "EA_ASSERT did not invoke the failure callback\n"); return EXIT_FAILURE; } return EXIT_SUCCESS; }