mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 05:36:54 +08:00
Added preprocessor variables to allow unit tests to run against config/runtime data
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
add_definitions( -DOPENALPR_TESTING_CONFIG_PATH="${CMAKE_SOURCE_DIR}/../config/openalpr.conf.in")
|
||||||
|
add_definitions( -DOPENALPR_TESTING_RUNTIME_DIR="${CMAKE_SOURCE_DIR}/../runtime_data/")
|
||||||
|
|
||||||
ADD_EXECUTABLE( unittests
|
ADD_EXECUTABLE( unittests
|
||||||
test_api.cpp
|
test_api.cpp
|
||||||
test_utility.cpp
|
test_utility.cpp
|
||||||
|
@@ -14,7 +14,7 @@ using namespace alpr;
|
|||||||
|
|
||||||
Config get_config(std::string countries)
|
Config get_config(std::string countries)
|
||||||
{
|
{
|
||||||
Config config(countries, "", "");
|
Config config(countries, OPENALPR_TESTING_CONFIG_PATH, OPENALPR_TESTING_RUNTIME_DIR);
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user