Fixed old comments and added new ones.
This commit is contained in:
parent
1819321f75
commit
88d6f70285
2 changed files with 19 additions and 1 deletions
|
@ -48,6 +48,7 @@ _TestCaseQuit()
|
||||||
{
|
{
|
||||||
//! \todo make the test fail, if it does not contain any asserts
|
//! \todo make the test fail, if it does not contain any asserts
|
||||||
printf("Asserts: passed %d, failed %d\n", _testAssertsPassed, _testAssertsFailed);
|
printf("Asserts: passed %d, failed %d\n", _testAssertsPassed, _testAssertsFailed);
|
||||||
|
|
||||||
if(_testAssertsFailed == 0 && _testAssertsPassed == 0) {
|
if(_testAssertsFailed == 0 && _testAssertsPassed == 0) {
|
||||||
_testReturnValue = 2;
|
_testReturnValue = 2;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +56,15 @@ _TestCaseQuit()
|
||||||
return _testReturnValue;
|
return _testReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
AssertEquals(Uint32 expected, Uint32 actual, char* message, ...)
|
AssertEquals(Uint32 expected, Uint32 actual, char* message, ...)
|
||||||
{
|
{
|
||||||
|
@ -73,6 +83,14 @@ AssertEquals(Uint32 expected, Uint32 actual, char* message, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Assert function. Tests if the given condition is true. True in
|
||||||
|
* this case means non-zero value. If the condition is true, the
|
||||||
|
* assert passes, otherwise it fails.
|
||||||
|
*
|
||||||
|
* \param condition Condition which will be evaluated
|
||||||
|
* \param message Message that will be printed if assert fails
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
AssertTrue(int condition, char *message, ...)
|
AssertTrue(int condition, char *message, ...)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ ScanForTestSuites() {
|
||||||
/*!
|
/*!
|
||||||
* Loads test suite which is implemented as dynamic library.
|
* Loads test suite which is implemented as dynamic library.
|
||||||
*
|
*
|
||||||
* \param test0,330
|
* \param testSuiteName Name of the test suite which will be loaded
|
||||||
*
|
*
|
||||||
* \return Pointer to loaded test suite, or NULL if library could not be loaded
|
* \return Pointer to loaded test suite, or NULL if library could not be loaded
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue