Skip to content

Commit fc1a43d

Browse files
author
Gin
committed
add test for Home button detector
1 parent 2a7caae commit fc1a43d

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* PokemonHome Tests
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*/
6+
7+
8+
#include "Common/Compiler.h"
9+
#include "PokemonHome_Tests.h"
10+
#include "TestUtils.h"
11+
12+
#include <iostream>
13+
using std::cout;
14+
using std::cerr;
15+
using std::endl;
16+
17+
namespace PokemonAutomation{
18+
19+
20+
int test_pokemonHome_BoxView(const ImageViewRGB32& image, const std::vector<std::string>& keywords){
21+
// TODO: Implement test
22+
return 0;
23+
}
24+
25+
int test_pokemonHome_SummaryScreen(const ImageViewRGB32& image, const std::vector<std::string>& keywords){
26+
// TODO: Implement test
27+
return 0;
28+
}
29+
30+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* PokemonHome Tests
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*
6+
*/
7+
8+
9+
#ifndef PokemonAutomation_Tests_PokemonHome_Tests_H
10+
#define PokemonAutomation_Tests_PokemonHome_Tests_H
11+
12+
#include <vector>
13+
#include <string>
14+
15+
namespace PokemonAutomation{
16+
17+
class ImageViewRGB32;
18+
19+
20+
int test_pokemonHome_BoxView(const ImageViewRGB32& image, const std::vector<std::string>& keywords);
21+
22+
int test_pokemonHome_SummaryScreen(const ImageViewRGB32& image, const std::vector<std::string>& keywords);
23+
24+
}
25+
26+
#endif

SerialPrograms/Source/Tests/TestMap.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "CommonFramework_Tests.h"
1010
#include "Kernels_Tests.h"
1111
#include "NintendoSwitch_Tests.h"
12+
#include "PokemonHome_Tests.h"
1213
#include "PokemonLA_Tests.h"
1314
#include "PokemonLZA_Tests.h"
1415
#include "PokemonSwSh_Tests.h"
@@ -263,6 +264,8 @@ const std::map<std::string, TestFunction> TEST_MAP = {
263264
{"PokemonLA_MMOSpriteMatcher", test_pokemonLA_MMOSpriteMatcher},
264265
{"PokemonLA_MapWeatherAndTimeReader", std::bind(image_words_detector_helper, test_pokemonLA_MapWeatherAndTimeReader, _1)},
265266
{"PokemonLA_FlagTrackerPerformance", std::bind(image_int_detector_helper, test_pokemonLA_FlagTracker_performance, _1)},
267+
{"PokemonHome_BoxView", std::bind(image_words_detector_helper, test_pokemonHome_BoxView, _1)},
268+
{"PokemonHome_SummaryScreen", std::bind(image_words_detector_helper, test_pokemonHome_SummaryScreen, _1)},
266269
{"PokemonSV_MapDetector", std::bind(image_words_detector_helper, test_pokemonSV_MapDetector, _1)},
267270
{"PokemonSV_PicnicDetector", std::bind(image_bool_detector_helper, test_pokemonSV_PicnicDetector, _1)},
268271
{"PokemonSV_TeraCardFinder", std::bind(image_bool_detector_helper, test_pokemonSV_TeraCardFinder, _1)},

SerialPrograms/cmake/SourceFiles.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,6 +2547,8 @@ file(GLOB LIBRARY_SOURCES
25472547
Source/Tests/Kernels_Tests.h
25482548
Source/Tests/NintendoSwitch_Tests.cpp
25492549
Source/Tests/NintendoSwitch_Tests.h
2550+
Source/Tests/PokemonHome_Tests.cpp
2551+
Source/Tests/PokemonHome_Tests.h
25502552
Source/Tests/PokemonLA_Tests.cpp
25512553
Source/Tests/PokemonLA_Tests.h
25522554
Source/Tests/PokemonLZA_Tests.cpp

0 commit comments

Comments
 (0)