forked from organicmaps/organicmaps
[generator] Added smoke test for mwm validation.
This commit is contained in:
parent
35420238e0
commit
f60d5dc0f0
2 changed files with 30 additions and 0 deletions
29
generator/generator_tests/check_mwms.cpp
Normal file
29
generator/generator_tests/check_mwms.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include "../../testing/testing.hpp"
|
||||
|
||||
#include "../../map/feature_vec_model.hpp"
|
||||
|
||||
#include "../../platform/platform.hpp"
|
||||
|
||||
|
||||
UNIT_TEST(CheckMWM_LoadAll)
|
||||
{
|
||||
Platform & pl = GetPlatform();
|
||||
|
||||
Platform::FilesList maps;
|
||||
pl.GetFilesByExt(pl.WritableDir(), DATA_FILE_EXTENSION, maps);
|
||||
|
||||
model::FeaturesFetcher m;
|
||||
m.InitClassificator();
|
||||
|
||||
for (string const & s : maps)
|
||||
{
|
||||
try
|
||||
{
|
||||
m.AddMap(s);
|
||||
}
|
||||
catch (RootException const & ex)
|
||||
{
|
||||
TEST(false, ("Bad mwm file:", s));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,3 +31,4 @@ SOURCES += \
|
|||
coasts_test.cpp \
|
||||
feature_builder_test.cpp \
|
||||
classificator_tests.cpp \
|
||||
check_mwms.cpp \
|
||||
|
|
Loading…
Add table
Reference in a new issue