| 585 | } |
| 586 | |
| 587 | void 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 | |
| 602 | FakeEnding MakeFakeEnding(uint32_t featureId, uint32_t segmentIdx, m2::PointD const & point, WorldGraph & graph) |
| 603 | { |
no test coverage detected