From eb49e28e6cb9c57d03d5a5d952735a0d4c57fe7b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 8 Mar 2023 08:26:33 -0300 Subject: [PATCH] Renamed TEST_RESULT_SKIP to TEST_RESULT_ASSUMPTION_FAIL --- test/test.h | 4 ++-- test/test_runner.c | 8 ++++---- test/test_runner_battle.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test.h b/test/test.h index c69a4fa925..27475bb48e 100644 --- a/test/test.h +++ b/test/test.h @@ -9,7 +9,7 @@ enum TestResult { TEST_RESULT_FAIL, TEST_RESULT_PASS, - TEST_RESULT_SKIP, + TEST_RESULT_ASSUMPTION_FAIL, TEST_RESULT_INVALID, TEST_RESULT_ERROR, TEST_RESULT_TIMEOUT, @@ -77,7 +77,7 @@ s32 MgbaPrintf_(const char *fmt, ...); do \ { \ 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) #define EXPECT(c) \ diff --git a/test/test_runner.c b/test/test_runner.c index eb5d12c778..9d33301f9d 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -121,7 +121,7 @@ void CB2_TestRunner(void) // NOTE: Assumes that the compiler interns __FILE__. if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename) { - gTestRunnerState.result = TEST_RESULT_SKIP; + gTestRunnerState.result = TEST_RESULT_ASSUMPTION_FAIL; } else { @@ -157,7 +157,7 @@ void CB2_TestRunner(void) color = "\e[32m"; 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; color = "\e[31m"; @@ -187,7 +187,7 @@ void CB2_TestRunner(void) } break; case TEST_RESULT_PASS: result = "PASS"; break; - case TEST_RESULT_SKIP: + case TEST_RESULT_ASSUMPTION_FAIL: result = "ASSUMPTION_FAIL"; color = "\e[33m"; break; @@ -199,7 +199,7 @@ void CB2_TestRunner(void) if (gTestRunnerState.result == TEST_RESULT_PASS) 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); else if (gTestRunnerState.expectedResult == gTestRunnerState.result) MgbaPrintf_(":K%s%s\e[0m", color, result); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index e40ed3e50b..ec7ba275c2 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -720,7 +720,7 @@ static void CB2_BattleTest_NextTrial(void) case TEST_RESULT_PASS: STATE->observedPasses++; break; - case TEST_RESULT_SKIP: + case TEST_RESULT_ASSUMPTION_FAIL: STATE->skippedTrials++; if (STATE->skippedTrials > STATE->trials / 4) Test_ExitWithResult(TEST_RESULT_INVALID, "25%% of the trials were SKIPed");