MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / BOOST_FIXTURE_TEST_CASE

Function BOOST_FIXTURE_TEST_CASE

unit_tests/util/static_graph.cpp:82–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80using TestRandomArrayEntryFixture = RandomArrayEntryFixture<TEST_NUM_NODES, TEST_NUM_EDGES>;
81
82BOOST_FIXTURE_TEST_CASE(array_test, TestRandomArrayEntryFixture)
83{
84 auto nodes_copy = nodes;
85
86 TestStaticGraph graph(nodes, edges);
87
88 BOOST_CHECK_EQUAL(graph.GetNumberOfEdges(), TEST_NUM_EDGES);
89 BOOST_CHECK_EQUAL(graph.GetNumberOfNodes(), TEST_NUM_NODES);
90
91 for (auto idx : order)
92 {
93 BOOST_CHECK_EQUAL(graph.BeginEdges((NodeID)idx), nodes_copy[idx].first_edge);
94 BOOST_CHECK_EQUAL(graph.EndEdges((NodeID)idx), nodes_copy[idx + 1].first_edge);
95 BOOST_CHECK_EQUAL(graph.GetOutDegree((NodeID)idx), lengths[idx]);
96 }
97}
98
99BOOST_AUTO_TEST_CASE(target_test)
100{

Callers

nothing calls this directly

Calls 5

GetNumberOfEdgesMethod · 0.45
GetNumberOfNodesMethod · 0.45
BeginEdgesMethod · 0.45
EndEdgesMethod · 0.45
GetOutDegreeMethod · 0.45

Tested by

no test coverage detected