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

Function UNIT_TEST

libs/routing/routing_tests/astar_algorithm_test.cpp:39–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39UNIT_TEST(AStarAlgorithm_Sample)
40{
41 UndirectedGraph graph;
42
43 // Inserts edges in a format: <source, target, weight>.
44 graph.AddEdge(0, 1, 10);
45 graph.AddEdge(1, 2, 5);
46 graph.AddEdge(2, 3, 5);
47 graph.AddEdge(2, 4, 10);
48 graph.AddEdge(3, 4, 3);
49
50 vector<unsigned> const expectedRoute = {0, 1, 2, 3, 4};
51
52 TestAStar(graph, expectedRoute, 23);
53}
54
55UNIT_TEST(AStarAlgorithm_CheckLength)
56{

Callers

nothing calls this directly

Calls 7

TestAStarFunction · 0.85
TESTFunction · 0.85
FindPathBidirectionalMethod · 0.80
AddEdgeMethod · 0.45
FindPathMethod · 0.45
AdjustRouteMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected