Harness kills hung tests (won't work with --in-proc option).
Added result description to test logs (tells why test failed, such as exceeding its timeout).
This commit is contained in:
parent
4790fd63e3
commit
7de8abe0c4
7 changed files with 110 additions and 30 deletions
|
@ -38,7 +38,7 @@ int _testAssertsPassed;
|
|||
void
|
||||
_InitTestEnvironment()
|
||||
{
|
||||
_testReturnValue = 0;
|
||||
_testReturnValue = TEST_RESULT_PASS;
|
||||
_testAssertsFailed = 0;
|
||||
_testAssertsPassed = 0;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ _QuitTestEnvironment()
|
|||
_testAssertsFailed, _testAssertsPassed, time(0));
|
||||
|
||||
if(_testAssertsFailed == 0 && _testAssertsPassed == 0) {
|
||||
_testReturnValue = 2;
|
||||
_testReturnValue = TEST_RESULT_NO_ASSERT;
|
||||
}
|
||||
|
||||
return _testReturnValue;
|
||||
|
@ -75,7 +75,7 @@ AssertEquals(int expected, int actual, char *message, ...)
|
|||
if(expected != expected) {
|
||||
AssertWithValues("AssertEquals", 0, buf, actual, expected, time(0));
|
||||
|
||||
_testReturnValue = 1;
|
||||
_testReturnValue = TEST_RESULT_FAILURE;
|
||||
_testAssertsFailed++;
|
||||
} else {
|
||||
AssertWithValues("AssertEquals", 1, buf,
|
||||
|
@ -97,7 +97,7 @@ AssertTrue(int condition, char *message, ...)
|
|||
if (!condition) {
|
||||
Assert("AssertTrue", 0, buf, time(0));
|
||||
|
||||
_testReturnValue = 1;
|
||||
_testReturnValue = TEST_RESULT_FAILURE;
|
||||
_testAssertsFailed++;
|
||||
} else {
|
||||
Assert("AssertTrue", 1, buf, time(0));
|
||||
|
@ -133,7 +133,7 @@ AssertFail(char *message, ...)
|
|||
|
||||
Assert("AssertFail", 0, buf, time(0));
|
||||
|
||||
_testReturnValue = 1;
|
||||
_testReturnValue = TEST_RESULT_FAILURE;
|
||||
_testAssertsFailed++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue