Fix formating

This commit is contained in:
Patrick Niklaus
2018-03-22 18:26:40 +00:00
parent 993f5badf1
commit c0dd5d7c76
39 changed files with 244 additions and 149 deletions
+7 -4
View File
@@ -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;
+6 -4
View File
@@ -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