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

Function TestTopologyGraph

libs/routing/routing_tests/index_graph_tools.cpp:587–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587void TestTopologyGraph(TestIndexGraphTopology const & graph, TestIndexGraphTopology::Vertex from,
588 TestIndexGraphTopology::Vertex to, bool expectedPathFound, double const expectedWeight,
589 vector<TestIndexGraphTopology::Edge> const & expectedEdges)
590{
591 double pathWeight = 0.0;
592 vector<TestIndexGraphTopology::Edge> pathEdges;
593 bool const pathFound = graph.FindPath(from, to, pathWeight, pathEdges);
594 TEST_EQUAL(pathFound, expectedPathFound, ());
595 if (!pathFound)
596 return;
597
598 TEST(AlmostEqualAbs(pathWeight, expectedWeight, kEpsilon), (pathWeight, expectedWeight, pathEdges));
599 TEST_EQUAL(pathEdges, expectedEdges, ());
600}
601
602FakeEnding MakeFakeEnding(uint32_t featureId, uint32_t segmentIdx, m2::PointD const & point, WorldGraph & graph)
603{

Callers 2

UNIT_TESTFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 3

TESTFunction · 0.85
AlmostEqualAbsFunction · 0.50
FindPathMethod · 0.45

Tested by

no test coverage detected