Fixed 2 test runner issues (#3076)
* Fixed 2 test runner issues Thanks to MGriffin for the help - Fixed non-battle tests omitting errors when failing. - Fixed non-battle tests showing false positive memory leak errors due to the test failing for a different cause. * Update test/test_runner.c Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
This commit is contained in:
parent
4a6f791482
commit
f3be4e1ac5
1 changed files with 5 additions and 4 deletions
|
@ -155,7 +155,8 @@ void CB2_TestRunner(void)
|
|||
if (gTestRunnerState.test->runner->tearDown)
|
||||
gTestRunnerState.test->runner->tearDown(gTestRunnerState.test->data);
|
||||
|
||||
if (!gTestRunnerState.expectLeaks)
|
||||
if (gTestRunnerState.result == gTestRunnerState.expectedResult
|
||||
&& !gTestRunnerState.expectLeaks)
|
||||
{
|
||||
const struct MemBlock *head = HeapHead();
|
||||
const struct MemBlock *block = head;
|
||||
|
@ -372,10 +373,10 @@ void Test_ExitWithResult(enum TestResult result, const char *fmt, ...)
|
|||
gTestRunnerState.result = result;
|
||||
ReinitCallbacks();
|
||||
if (gTestRunnerState.state == STATE_REPORT_RESULT
|
||||
&& gTestRunnerState.test->runner->handleExitWithResult)
|
||||
&& gTestRunnerState.result != gTestRunnerState.expectedResult)
|
||||
{
|
||||
if (!gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result)
|
||||
&& gTestRunnerState.result != gTestRunnerState.expectedResult)
|
||||
if (!gTestRunnerState.test->runner->handleExitWithResult
|
||||
|| !gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result))
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
|
|
Loading…
Reference in a new issue