MCPcopy Create free account
hub / github.com/comaps/comaps / TestAStarRouterMock

Function TestAStarRouterMock

libs/routing/routing_tests/astar_router_test.cpp:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using namespace std;
27
28void TestAStarRouterMock(geometry::PointWithAltitude const & startPos, geometry::PointWithAltitude const & finalPos,
29 vector<geometry::PointWithAltitude> const & expected)
30{
31 classificator::Load();
32
33 RoadGraphMockSource graph;
34 InitRoadGraphMockSourceWithTest2(graph);
35
36 RoutingResult<geometry::PointWithAltitude, double /* Weight */> result;
37 TestAStarBidirectionalAlgo algorithm;
38 TEST_EQUAL(TestAStarBidirectionalAlgo::Result::OK, algorithm.CalculateRoute(graph, startPos, finalPos, result), ());
39
40 TEST_EQUAL(expected, result.m_path, ());
41}
42
43void AddRoad(RoadGraphMockSource & graph, double speedKMPH, initializer_list<m2::PointD> const & points)
44{

Callers 1

UNIT_TESTFunction · 0.85

Calls 3

LoadFunction · 0.50
CalculateRouteMethod · 0.45

Tested by

no test coverage detected