Fix formating
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(tar)
|
||||
|
||||
using namespace osrm;
|
||||
@@ -25,7 +24,7 @@ BOOST_AUTO_TEST_CASE(read_write_hsgr)
|
||||
TestEdge{3, 1, 1},
|
||||
TestEdge{4, 3, 1},
|
||||
TestEdge{5, 1, 1}};
|
||||
auto reference_graph = QueryGraph {6, toEdges<QueryEdge>(makeGraph(edges))};
|
||||
auto reference_graph = QueryGraph{6, toEdges<QueryEdge>(makeGraph(edges))};
|
||||
std::vector<std::vector<bool>> reference_filters = {
|
||||
{false, false, true, true, false, false, true},
|
||||
{true, false, true, false, true, false, true},
|
||||
@@ -33,8 +32,12 @@ BOOST_AUTO_TEST_CASE(read_write_hsgr)
|
||||
{true, true, true, true, true, true, true},
|
||||
};
|
||||
|
||||
TemporaryFile tmp {TEST_DATA_DIR "/read_write_hsgr_test.osrm.hsgr"};
|
||||
contractor::files::writeGraph(tmp.path, reference_checksum, reference_graph, reference_filters, reference_connectivity_checksum);
|
||||
TemporaryFile tmp{TEST_DATA_DIR "/read_write_hsgr_test.osrm.hsgr"};
|
||||
contractor::files::writeGraph(tmp.path,
|
||||
reference_checksum,
|
||||
reference_graph,
|
||||
reference_filters,
|
||||
reference_connectivity_checksum);
|
||||
|
||||
unsigned checksum;
|
||||
unsigned connectivity_checksum;
|
||||
|
||||
@@ -22,17 +22,19 @@ inline contractor::ContractorGraph makeGraph(const std::vector<TestEdge> &edges)
|
||||
std::tie(start, target, weight) = edge;
|
||||
max_id = std::max(std::max(start, target), max_id);
|
||||
input_edges.push_back(contractor::ContractorEdge{
|
||||
start, target, contractor::ContractorEdgeData{weight, weight * 2, id++, 0, false, true, false}});
|
||||
start,
|
||||
target,
|
||||
contractor::ContractorEdgeData{weight, weight * 2, id++, 0, false, true, false}});
|
||||
input_edges.push_back(contractor::ContractorEdge{
|
||||
target, start, contractor::ContractorEdgeData{weight, weight * 2, id++, 0, false, false, true}});
|
||||
target,
|
||||
start,
|
||||
contractor::ContractorEdgeData{weight, weight * 2, id++, 0, false, false, true}});
|
||||
}
|
||||
std::sort(input_edges.begin(), input_edges.end());
|
||||
|
||||
return contractor::ContractorGraph{max_id + 1, std::move(input_edges)};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user