From e902ab4693fe6655028675a99f7f5919f582558a Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Mon, 20 Mar 2017 15:59:50 +0000 Subject: [PATCH] Fix all customization tests --- unit_tests/customizer/cell_customization.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/unit_tests/customizer/cell_customization.cpp b/unit_tests/customizer/cell_customization.cpp index ea4f0eb6f..b0f5bae0f 100644 --- a/unit_tests/customizer/cell_customization.cpp +++ b/unit_tests/customizer/cell_customization.cpp @@ -3,6 +3,7 @@ #include "customizer/cell_customizer.hpp" #include "partition/multi_level_partition.hpp" +#include "partition/multi_level_graph.hpp" #include "util/static_graph.hpp" using namespace osrm; @@ -19,7 +20,7 @@ struct MockEdge EdgeWeight weight; }; -auto makeGraph(const std::vector &mock_edges) +auto makeGraph(const MultiLevelPartition &mlp, const std::vector &mock_edges) { struct EdgeData { @@ -37,7 +38,7 @@ auto makeGraph(const std::vector &mock_edges) edges.push_back(Edge{m.target, m.start, m.weight, false, true}); } std::sort(edges.begin(), edges.end()); - return util::StaticGraph(max_id + 1, edges); + return partition::MultiLevelGraph(mlp, max_id + 1, edges); } } @@ -53,7 +54,7 @@ BOOST_AUTO_TEST_CASE(two_level_test) std::vector edges = {{0, 1, 1}, {0, 2, 1}, {2, 3, 1}, {3, 1, 1}, {3, 2, 1}}; - auto graph = makeGraph(edges); + auto graph = makeGraph(mlp, edges); CellStorage storage(mlp, graph); CellCustomizer customizer(mlp); @@ -130,7 +131,7 @@ BOOST_AUTO_TEST_CASE(four_levels_test) {14, 11, 1} // edge between cells (2, 1, 0) -> (0, 0, 0) }; - auto graph = makeGraph(edges); + auto graph = makeGraph(mlp, edges); CellStorage storage(mlp, graph);