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

Method TestRouters

libs/routing/routing_benchmarks/helpers.cpp:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void RoutingTest::TestRouters(m2::PointD const & startPos, m2::PointD const & finalPos)
87{
88 // Find route by A*-bidirectional algorithm.
89 routing::Route routeFoundByAstarBidirectional("", 0 /* route id */);
90 {
91 auto router = CreateRouter("test-astar-bidirectional");
92 TestRouter(*router, startPos, finalPos, routeFoundByAstarBidirectional);
93 }
94
95 // Find route by A* algorithm.
96 routing::Route routeFoundByAstar("", 0 /* route id */);
97 {
98 auto router = CreateRouter("test-astar");
99 TestRouter(*router, startPos, finalPos, routeFoundByAstar);
100 }
101
102 double constexpr kEpsilon = 1e-6;
103 TEST(AlmostEqualAbs(routeFoundByAstar.GetTotalDistanceMeters(),
104 routeFoundByAstarBidirectional.GetTotalDistanceMeters(), kEpsilon),
105 ());
106}
107
108void RoutingTest::TestTwoPointsOnFeature(m2::PointD const & startPos, m2::PointD const & finalPos)
109{

Callers

nothing calls this directly

Calls 4

TestRouterFunction · 0.85
TESTFunction · 0.85
AlmostEqualAbsFunction · 0.50

Tested by

no test coverage detected