| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | #define SDLTEST_ASSERT_SUMMARY_FORMAT "Assert Summary: Total=%d Passed=%d Failed=%d" |
| | | |
| | | /* ! \brief counts the failed asserts */ |
| | | static Uint32 SDLTest_AssertsFailed = 0; |
| | | static int SDLTest_AssertsFailed = 0; |
| | | |
| | | /* ! \brief counts the passed asserts */ |
| | | static Uint32 SDLTest_AssertsPassed = 0; |
| | | static int SDLTest_AssertsPassed = 0; |
| | | |
| | | /* |
| | | * Assert that logs and break execution flow on failures (i.e. for harness errors). |
| | |
| | | */ |
| | | void SDLTest_LogAssertSummary() |
| | | { |
| | | Uint32 totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed; |
| | | int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed; |
| | | if (SDLTest_AssertsFailed == 0) |
| | | { |
| | | SDLTest_Log(SDLTEST_ASSERT_SUMMARY_FORMAT, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |