Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,37 @@
#include "testing/testing.hpp"
#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/ftraits.hpp"
UNIT_TEST(Wheelchair_GetType)
{
classificator::Load();
Classificator const & c = classif();
using ftraits::Wheelchair;
using ftraits::WheelchairAvailability;
feature::TypesHolder holder;
{
holder.Assign(c.GetTypeByPath({"wheelchair", "no"}));
TEST_EQUAL(*Wheelchair::GetValue(holder), WheelchairAvailability::No, ());
}
{
holder.Assign(c.GetTypeByPath({"wheelchair", "yes"}));
TEST_EQUAL(*Wheelchair::GetValue(holder), WheelchairAvailability::Yes, ());
}
{
holder.Assign(c.GetTypeByPath({"wheelchair", "limited"}));
TEST_EQUAL(*Wheelchair::GetValue(holder), WheelchairAvailability::Limited, ());
}
{
holder.Assign(c.GetTypeByPath({"amenity", "dentist"}));
TEST(!Wheelchair::GetValue(holder), ());
}
{
holder.Assign(c.GetTypeByPath({"amenity", "dentist"}));
holder.Add(c.GetTypeByPath({"wheelchair", "yes"}));
TEST_EQUAL(*Wheelchair::GetValue(holder), WheelchairAvailability::Yes, ());
}
}