mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Renamed TEST_RESULT_SKIP to TEST_RESULT_ASSUMPTION_FAIL
This commit is contained in:
parent
e3ed114754
commit
eb49e28e6c
@ -9,7 +9,7 @@ enum TestResult
|
|||||||
{
|
{
|
||||||
TEST_RESULT_FAIL,
|
TEST_RESULT_FAIL,
|
||||||
TEST_RESULT_PASS,
|
TEST_RESULT_PASS,
|
||||||
TEST_RESULT_SKIP,
|
TEST_RESULT_ASSUMPTION_FAIL,
|
||||||
TEST_RESULT_INVALID,
|
TEST_RESULT_INVALID,
|
||||||
TEST_RESULT_ERROR,
|
TEST_RESULT_ERROR,
|
||||||
TEST_RESULT_TIMEOUT,
|
TEST_RESULT_TIMEOUT,
|
||||||
@ -77,7 +77,7 @@ s32 MgbaPrintf_(const char *fmt, ...);
|
|||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (!(c)) \
|
if (!(c)) \
|
||||||
Test_ExitWithResult(TEST_RESULT_SKIP, "%s:%d: ASSUME failed", gTestRunnerState.test->filename, __LINE__); \
|
Test_ExitWithResult(TEST_RESULT_ASSUMPTION_FAIL, "%s:%d: ASSUME failed", gTestRunnerState.test->filename, __LINE__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define EXPECT(c) \
|
#define EXPECT(c) \
|
||||||
|
@ -121,7 +121,7 @@ void CB2_TestRunner(void)
|
|||||||
// NOTE: Assumes that the compiler interns __FILE__.
|
// NOTE: Assumes that the compiler interns __FILE__.
|
||||||
if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename)
|
if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename)
|
||||||
{
|
{
|
||||||
gTestRunnerState.result = TEST_RESULT_SKIP;
|
gTestRunnerState.result = TEST_RESULT_ASSUMPTION_FAIL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ void CB2_TestRunner(void)
|
|||||||
color = "\e[32m";
|
color = "\e[32m";
|
||||||
MgbaPrintf_(":N%s", gTestRunnerState.test->name);
|
MgbaPrintf_(":N%s", gTestRunnerState.test->name);
|
||||||
}
|
}
|
||||||
else if (gTestRunnerState.result != TEST_RESULT_SKIP || gTestRunnerSkipIsFail)
|
else if (gTestRunnerState.result != TEST_RESULT_ASSUMPTION_FAIL || gTestRunnerSkipIsFail)
|
||||||
{
|
{
|
||||||
gTestRunnerState.exitCode = 1;
|
gTestRunnerState.exitCode = 1;
|
||||||
color = "\e[31m";
|
color = "\e[31m";
|
||||||
@ -187,7 +187,7 @@ void CB2_TestRunner(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TEST_RESULT_PASS: result = "PASS"; break;
|
case TEST_RESULT_PASS: result = "PASS"; break;
|
||||||
case TEST_RESULT_SKIP:
|
case TEST_RESULT_ASSUMPTION_FAIL:
|
||||||
result = "ASSUMPTION_FAIL";
|
result = "ASSUMPTION_FAIL";
|
||||||
color = "\e[33m";
|
color = "\e[33m";
|
||||||
break;
|
break;
|
||||||
@ -199,7 +199,7 @@ 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)
|
else if (gTestRunnerState.result == TEST_RESULT_ASSUMPTION_FAIL)
|
||||||
MgbaPrintf_(":A%s%s\e[0m", color, result);
|
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);
|
||||||
|
@ -720,7 +720,7 @@ static void CB2_BattleTest_NextTrial(void)
|
|||||||
case TEST_RESULT_PASS:
|
case TEST_RESULT_PASS:
|
||||||
STATE->observedPasses++;
|
STATE->observedPasses++;
|
||||||
break;
|
break;
|
||||||
case TEST_RESULT_SKIP:
|
case TEST_RESULT_ASSUMPTION_FAIL:
|
||||||
STATE->skippedTrials++;
|
STATE->skippedTrials++;
|
||||||
if (STATE->skippedTrials > STATE->trials / 4)
|
if (STATE->skippedTrials > STATE->trials / 4)
|
||||||
Test_ExitWithResult(TEST_RESULT_INVALID, "25%% of the trials were SKIPed");
|
Test_ExitWithResult(TEST_RESULT_INVALID, "25%% of the trials were SKIPed");
|
||||||
|
Loading…
Reference in New Issue
Block a user