Files
comaps/routing/routing_quality/routing_quality_tests/waypoints_tests.cpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

40 lines
1.1 KiB
C++

#include "testing/testing.hpp"
#include "routing/vehicle_mask.hpp"
#include "routing/routing_quality/waypoints.hpp"
#include <utility>
#include <vector>
namespace waypoins_tests
{
using namespace routing;
using namespace routing_quality;
using namespace std;
UNIT_TEST(RoutingQuality_CompareSmoke)
{
// From office to Aseeva 6.
TEST(CheckCarRoute({55.79723, 37.53777} /* start */, {55.80634, 37.52886} /* finish */,
{{{55.79676, 37.54138},
{55.79914, 37.53582},
{55.80353, 37.52478},
{55.80556, 37.52770}}} /* reference track */),
());
}
UNIT_TEST(RoutingQuality_Sokol2Mayakovskaya)
{
// From Sokol to Mayakovskaya through Leningradsky Avenue but not through its alternate.
Params params(VehicleType::Car, {55.80432, 37.51603} /* start */, {55.77019, 37.59558} /* finish */);
// All points lie on the alternate so the result should be 0.
ReferenceRoutes waypoints = {{
{55.79599, 37.54114}, {55.78142, 37.57364}, {55.77863, 37.57989}
}};
TEST_EQUAL(CheckWaypoints(params, std::move(waypoints)), 0.0, ());
}
} // namespace waypoins_tests