If any assert in SetUp function fails that test will be skipped.
This commit is contained in:
parent
3efe0fed79
commit
6d3454e153
11 changed files with 377 additions and 293 deletions
|
@ -69,13 +69,19 @@ void _InitTestEnvironment();
|
|||
*/
|
||||
int _QuitTestEnvironment();
|
||||
|
||||
/*!
|
||||
* Can be used to query the number of failed asserts
|
||||
* \return Returns the failed assert count.
|
||||
*/
|
||||
int _CountFailedAsserts();
|
||||
|
||||
/*!
|
||||
* Assert function. Tests if the expected value equals the actual value, then
|
||||
* the test assert succeeds, otherwise it fails and warns about it.
|
||||
*
|
||||
* \param expected Value user expects to have
|
||||
* \param actual The actual value of tested variable
|
||||
* \param message Message that will be printed if assert fails
|
||||
* \param message Message that will be printed
|
||||
*/
|
||||
void AssertEquals(const int expected, const int actual, char *message, ...);
|
||||
|
||||
|
@ -85,18 +91,22 @@ void AssertEquals(const int expected, const int actual, char *message, ...);
|
|||
* assert passes, otherwise it fails.
|
||||
*
|
||||
* \param condition Condition which will be evaluated
|
||||
* \param message Message that will be printed if assert fails
|
||||
* \param message Message that will be printed
|
||||
*/
|
||||
void AssertTrue(int condition, char *message, ...);
|
||||
|
||||
/*!
|
||||
\todo add markup
|
||||
*/
|
||||
* Assert function which will always fail
|
||||
*
|
||||
* \param message Message that will be printed
|
||||
*/
|
||||
void AssertFail(char *message, ...);
|
||||
|
||||
/*!
|
||||
\todo add markup
|
||||
*/
|
||||
* Assert function which will always pass
|
||||
*
|
||||
* \param message Message that will be printed
|
||||
*/
|
||||
void AssertPass(char *message, ...);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue