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

Function UNIT_TEST

libs/routing/routing_tests/road_access_test.cpp:209–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209UNIT_TEST(RoadAccess_WayBlocked)
210{
211 // Add edges to the graph in the following format: (from, to, weight).
212 // Block edges in the following format: (from, to).
213
214 uint32_t const numVertices = 4;
215 TestIndexGraphTopology graph(numVertices);
216
217 graph.AddDirectedEdge(0, 1, 1.0);
218 graph.AddDirectedEdge(1, 2, 1.0);
219 graph.AddDirectedEdge(2, 3, 1.0);
220
221 double const expectedWeight = 0.0;
222 vector<TestEdge> const expectedEdges = {};
223
224 graph.SetEdgeAccess(1, 2, RoadAccess::Type::No);
225
226 TestTopologyGraph(graph, 0, 3, false /* pathFound */, expectedWeight, expectedEdges);
227}
228
229UNIT_TEST(RoadAccess_WayBlocking)
230{

Callers

nothing calls this directly

Calls 8

TestTopologyGraphFunction · 0.85
GetUnixtimeByDateFunction · 0.85
GetUnixtimeByWeekdayFunction · 0.85
AddDirectedEdgeMethod · 0.80
SetEdgeAccessMethod · 0.80
SetVertexAccessMethod · 0.80
SetCurrentTimeGetterMethod · 0.45

Tested by

no test coverage detected