#pragma once #include "routing/edge_estimator.hpp" #include "routing/index_graph.hpp" #include "routing/index_graph_starter.hpp" #include "routing/road_point.hpp" #include "routing/base/astar_algorithm.hpp" #include "geometry/point2d.hpp" #include "std/algorithm.hpp" #include "std/shared_ptr.hpp" #include "std/unique_ptr.hpp" #include "std/unordered_map.hpp" #include "std/vector.hpp" namespace routing_test { class TestGeometryLoader final : public routing::GeometryLoader { public: // GeometryLoader overrides: void Load(uint32_t featureId, routing::RoadGeometry & road) const override; void AddRoad(uint32_t featureId, bool oneWay, routing::RoadGeometry::Points const & points); private: unordered_map m_roads; }; routing::Joint MakeJoint(vector const & points); shared_ptr CreateEstimator(); routing::AStarAlgorithm::Result CalculateRoute( routing::IndexGraphStarter const & graph, vector & roadPoints); void TestRouteSegments(routing::IndexGraphStarter const & starter, routing::AStarAlgorithm::Result expectedRouteResult, vector const & expectedRoute); void TestRouteGeometry(routing::IndexGraphStarter const & starter, routing::AStarAlgorithm::Result expectedRouteResult, vector const & expectedRouteGeom); } // namespace routing_test