Update assert API in test lib; add to and harness; add test lib to VS2010 and VS2012 solution; fix VS2012 solution; fix compiler warning

This commit is contained in:
Andreas Schiffler 2012-12-01 14:48:30 -08:00
parent a8af7eca89
commit d4bfe07a4f
10 changed files with 469 additions and 20 deletions

View file

@ -44,6 +44,16 @@ extern "C" {
/* *INDENT-ON* */
#endif
/**
* \brief Fails the assert.
*/
#define ASSERT_FAIL 0
/**
* \brief Passes the assert.
*/
#define ASSERT_PASS 1
/**
* \brief Assert that logs and break execution flow on failures.
*
@ -57,8 +67,10 @@ void SDLTest_Assert(int assertCondition, char *assertDescription);
*
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
* \param assertDescription Message to log with the assert describing it.
*
* \returns Returns the assertCondition so it can be used to externall to break execution flow if desired.
*/
void SDLTest_AssertCheck(int assertCondition, char *assertDescription);
int SDLTest_AssertCheck(int assertCondition, char *assertDescription);
/**
* \brief Resets the assert summary counters to zero.