Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wheelchair_tests.cpp « indexer_tests « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 642955596f50b229aec4103fa68789eb281d4455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "testing/testing.hpp"

#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/wheelchair.hpp"

UNIT_TEST(Wheelchair_GetType)
{
  classificator::Load();
  Classificator const & c = classif();

  feature::TypesHolder holder;
  {
    holder.Assign(c.GetTypeByPath({"wheelchair", "no"}));
    TEST_EQUAL(wheelchair::Matcher::GetType(holder), wheelchair::Type::No, ());
  }
  {
    holder.Assign(c.GetTypeByPath({"wheelchair", "yes"}));
    TEST_EQUAL(wheelchair::Matcher::GetType(holder), wheelchair::Type::Yes, ());
  }
  {
    holder.Assign(c.GetTypeByPath({"wheelchair", "limited"}));
    TEST_EQUAL(wheelchair::Matcher::GetType(holder), wheelchair::Type::Limited, ());
  }
  {
    holder.Assign(c.GetTypeByPath({"amenity", "dentist"}));
    TEST_EQUAL(wheelchair::Matcher::GetType(holder), wheelchair::Type::No, ());
  }
  {
    holder.Assign(c.GetTypeByPath({"amenity", "dentist"}));
    holder.Add(c.GetTypeByPath({"wheelchair", "yes"}));
    TEST_EQUAL(wheelchair::Matcher::GetType(holder), wheelchair::Type::Yes, ());
  }
}