Skip to content

Commit 9249157

Browse files
committed
shiny symbol test (no adjustments)
1 parent 235e7e8 commit 9249157

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

SerialPrograms/Source/Tests/PokemonFRLG_Tests.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "CommonFramework/Logging/Logger.h"
99
#include "PokemonFRLG/Inference/Dialogs/PokemonFRLG_DialogDetector.h"
10+
#include "PokemonFRLG/Inference/PokemonFRLG_ShinySymbolDetector.h"
1011
#include "PokemonFRLG_Tests.h"
1112
#include "TestUtils.h"
1213
#include "CommonFramework/Language.h"
@@ -33,4 +34,13 @@ int test_pokemonFRLG_AdvanceWhiteDialogDetector(const ImageViewRGB32& image, boo
3334
return 0;
3435
}
3536

37+
int test_pokemonFRLG_ShinySymbolDetector(const ImageViewRGB32& image, bool target){
38+
auto& logger = global_logger_command_line();
39+
auto overlay = DummyVideoOverlay();
40+
ShinySymbolDetector detector(COLOR_RED);
41+
bool result = detector.read(logger, image);
42+
TEST_RESULT_EQUAL(result, target);
43+
return 0;
44+
}
45+
3646
}

SerialPrograms/Source/Tests/PokemonFRLG_Tests.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class ImageViewRGB32;
1919

2020
int test_pokemonFRLG_AdvanceWhiteDialogDetector(const ImageViewRGB32& image, bool target);
2121

22+
int test_pokemonFRLG_ShinySymbolDetector(const ImageViewRGB32& image, bool target);
23+
2224
}
2325

2426
#endif

SerialPrograms/Source/Tests/TestMap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ const std::map<std::string, TestFunction> TEST_MAP = {
310310
{"PokemonLZA_FlavorPowerScreenDetector", test_pokemonLZA_FlavorPowerScreenDetector},
311311
{"PokemonLZA_DonutBerriesReader", test_pokemonLZA_DonutBerriesReader},
312312
{"PokemonFRLG_AdvanceWhiteDialogDetector", std::bind(image_bool_detector_helper, test_pokemonFRLG_AdvanceWhiteDialogDetector, _1)},
313+
{"PokemonFRLG_ShinySymbolDetector", std::bind(image_bool_detector_helper, test_pokemonFRLG_ShinySymbolDetector, _1)},
313314
};
314315

315316
TestFunction find_test_function(const std::string& test_space, const std::string& test_name){

0 commit comments

Comments
 (0)