[tests] Fixed tests.

This commit is contained in:
vng 2015-12-08 20:27:16 +03:00 committed by Sergey Yershov
parent 83ae2f58fb
commit 712ba1d09f

View file

@ -4,6 +4,7 @@
#include "indexer/index.hpp"
#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
#include "base/logging.hpp"
@ -84,6 +85,8 @@ vector<uint32_t> GetBridgeAndTunnelTypes()
UNIT_TEST(IsTypeConformed)
{
classificator::Load();
char const * arr[][roadArrColumnCount] =
{
{"highway", "trunk", "bridge"},
@ -101,6 +104,8 @@ UNIT_TEST(IsTypeConformed)
UNIT_TEST(IsStreetChecker)
{
classificator::Load();
TEST(ftypes::IsStreetChecker::Instance()(GetStreetTypes()), ());
TEST(ftypes::IsStreetChecker::Instance()(GetStreetAndNotStreetTypes()), ());
TEST(!ftypes::IsStreetChecker::Instance()(GetLinkTypes()), ());
@ -108,12 +113,16 @@ UNIT_TEST(IsStreetChecker)
UNIT_TEST(IsLinkChecker)
{
classificator::Load();
TEST(ftypes::IsLinkChecker::Instance()(GetLinkTypes()), ());
TEST(!ftypes::IsLinkChecker::Instance()(GetStreetTypes()), ());
}
UNIT_TEST(IsBridgeChecker)
{
classificator::Load();
TEST(ftypes::IsBridgeChecker::Instance()(GetBridgeTypes()), ());
TEST(ftypes::IsBridgeChecker::Instance()(GetBridgeAndTunnelTypes()), ());
TEST(!ftypes::IsBridgeChecker::Instance()(GetTunnelTypes()), ());
@ -121,6 +130,8 @@ UNIT_TEST(IsBridgeChecker)
UNIT_TEST(IsTunnelChecker)
{
classificator::Load();
TEST(ftypes::IsTunnelChecker::Instance()(GetTunnelTypes()), ());
TEST(ftypes::IsTunnelChecker::Instance()(GetBridgeAndTunnelTypes()), ());
TEST(!ftypes::IsTunnelChecker::Instance()(GetBridgeTypes()), ());
@ -128,6 +139,8 @@ UNIT_TEST(IsTunnelChecker)
UNIT_TEST(GetHighwayClassTest)
{
classificator::Load();
Classificator const & c = classif();
feature::TypesHolder types1;