From 1c0e8a689fd0129a9730b87b255547c98726e27a Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 7 Oct 2019 17:41:32 +0300 Subject: [PATCH] [indexer] Test on IsMotorwayJunctionChecker. --- indexer/indexer_tests/checker_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/indexer/indexer_tests/checker_test.cpp b/indexer/indexer_tests/checker_test.cpp index fc51095d4d..b7cd7c2f72 100644 --- a/indexer/indexer_tests/checker_test.cpp +++ b/indexer/indexer_tests/checker_test.cpp @@ -100,6 +100,12 @@ vector GetBridgeAndTunnelTypes() return GetTypes(arr, ARRAY_SIZE(arr)); } +uint32_t GetMotorwayJunctionType() +{ + Classificator const & c = classif(); + return c.GetTypeByPath({"highway", "motorway_junction"}); +} + vector GetPoiTypes() { std::vector const types = { @@ -238,3 +244,11 @@ UNIT_TEST(IsAttractionsChecker) TEST(!checker(c.GetTypeByPath({"route", "shuttle_train"})), ()); } + +UNIT_TEST(IsMotorwayJunctionChecker) +{ + classificator::Load(); + + TEST(ftypes::IsMotorwayJunctionChecker::Instance()(GetMotorwayJunctionType()), ()); + TEST(!ftypes::IsMotorwayJunctionChecker::Instance()(GetPoiTypes()), ()); +}