mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Added assumption fail total, made fails into their own counter and changed "SKIP" to "ASSUMPTION_FAIIL" in log
This commit is contained in:
parent
54e388a375
commit
5808e82434
@ -187,7 +187,10 @@ void CB2_TestRunner(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TEST_RESULT_PASS: result = "PASS"; break;
|
case TEST_RESULT_PASS: result = "PASS"; break;
|
||||||
case TEST_RESULT_SKIP: result = "SKIP"; break;
|
case TEST_RESULT_SKIP:
|
||||||
|
result = "ASSUMPTION_FAIL";
|
||||||
|
color = "\e[33m";
|
||||||
|
break;
|
||||||
case TEST_RESULT_INVALID: result = "INVALID"; break;
|
case TEST_RESULT_INVALID: result = "INVALID"; break;
|
||||||
case TEST_RESULT_ERROR: result = "ERROR"; break;
|
case TEST_RESULT_ERROR: result = "ERROR"; break;
|
||||||
case TEST_RESULT_TIMEOUT: result = "TIMEOUT"; break;
|
case TEST_RESULT_TIMEOUT: result = "TIMEOUT"; break;
|
||||||
@ -196,6 +199,8 @@ void CB2_TestRunner(void)
|
|||||||
|
|
||||||
if (gTestRunnerState.result == TEST_RESULT_PASS)
|
if (gTestRunnerState.result == TEST_RESULT_PASS)
|
||||||
MgbaPrintf_(":P%s%s\e[0m", color, result);
|
MgbaPrintf_(":P%s%s\e[0m", color, result);
|
||||||
|
else if (gTestRunnerState.result == TEST_RESULT_SKIP)
|
||||||
|
MgbaPrintf_(":A%s%s\e[0m", color, result);
|
||||||
else if (gTestRunnerState.expectedResult == gTestRunnerState.result)
|
else if (gTestRunnerState.expectedResult == gTestRunnerState.result)
|
||||||
MgbaPrintf_(":K%s%s\e[0m", color, result);
|
MgbaPrintf_(":K%s%s\e[0m", color, result);
|
||||||
else
|
else
|
||||||
|
@ -44,6 +44,8 @@ struct Runner
|
|||||||
char *output_buffer;
|
char *output_buffer;
|
||||||
int passes;
|
int passes;
|
||||||
int knownFails;
|
int knownFails;
|
||||||
|
int assumptionFails;
|
||||||
|
int fails;
|
||||||
int results;
|
int results;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,12 +82,17 @@ static void handle_read(struct Runner *runner)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
case 'F':
|
runner->passes++;
|
||||||
|
goto add_to_results;
|
||||||
case 'K':
|
case 'K':
|
||||||
if (soc[1] == 'P')
|
runner->knownFails++;
|
||||||
runner->passes++;
|
goto add_to_results;
|
||||||
else if (soc[1] == 'K')
|
case 'A':
|
||||||
runner->knownFails++;
|
runner->assumptionFails++;
|
||||||
|
goto add_to_results;
|
||||||
|
case 'F':
|
||||||
|
runner->fails++;
|
||||||
|
add_to_results:
|
||||||
runner->results++;
|
runner->results++;
|
||||||
soc += 2;
|
soc += 2;
|
||||||
fprintf(stdout, "%s: ", runner->test_name);
|
fprintf(stdout, "%s: ", runner->test_name);
|
||||||
@ -420,6 +427,8 @@ int main(int argc, char *argv[])
|
|||||||
int exit_code = 0;
|
int exit_code = 0;
|
||||||
int passes = 0;
|
int passes = 0;
|
||||||
int knownFails = 0;
|
int knownFails = 0;
|
||||||
|
int assumptionFails = 0;
|
||||||
|
int fails = 0;
|
||||||
int results = 0;
|
int results = 0;
|
||||||
for (int i = 0; i < nrunners; i++)
|
for (int i = 0; i < nrunners; i++)
|
||||||
{
|
{
|
||||||
@ -435,6 +444,8 @@ int main(int argc, char *argv[])
|
|||||||
exit_code = WEXITSTATUS(wstatus);
|
exit_code = WEXITSTATUS(wstatus);
|
||||||
passes += runners[i].passes;
|
passes += runners[i].passes;
|
||||||
knownFails += runners[i].knownFails;
|
knownFails += runners[i].knownFails;
|
||||||
|
assumptionFails += runners[i].assumptionFails;
|
||||||
|
fails += runners[i].fails;
|
||||||
results += runners[i].results;
|
results += runners[i].results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,11 +456,13 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout, "\n- Tests TOTAL: %d\n", results);
|
fprintf(stdout, "\n- Tests TOTAL: %d\n", results);
|
||||||
fprintf(stdout, "- Tests \e[32mPASSED: \e[0m %d\n", passes);
|
fprintf(stdout, "- Tests \e[32mPASSED\e[0m: %d\n", passes);
|
||||||
if (knownFails > 0)
|
if (knownFails > 0)
|
||||||
fprintf(stdout, "- Tests \e[33mKNOWN_FAILING:\e[0m %d\n", knownFails);
|
fprintf(stdout, "- Tests \e[33mKNOWN_FAILING\e[0m: %d\n", knownFails);
|
||||||
if (passes + knownFails < results)
|
if (fails > 0)
|
||||||
fprintf(stdout, "- Tests \e[31mFAILED: \e[0m %d\n", results - passes - knownFails);
|
fprintf(stdout, "- Tests \e[31mFAILED\e[0m : %d\n", fails);
|
||||||
|
if (assumptionFails > 0)
|
||||||
|
fprintf(stdout, "- \e[33mASSUMPTIONS_FAILED\e[0m: %d\n", assumptionFails);
|
||||||
}
|
}
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user