Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'routing/routing_tests')
-rw-r--r--routing/routing_tests/async_router_test.cpp4
-rw-r--r--routing/routing_tests/routing_algorithm.cpp5
-rw-r--r--routing/routing_tests/routing_session_test.cpp26
3 files changed, 22 insertions, 13 deletions
diff --git a/routing/routing_tests/async_router_test.cpp b/routing/routing_tests/async_router_test.cpp
index a680258694..db2f89d192 100644
--- a/routing/routing_tests/async_router_test.cpp
+++ b/routing/routing_tests/async_router_test.cpp
@@ -121,7 +121,7 @@ UNIT_CLASS_TEST(AsyncGuiThreadTest, NeedMoreMapsSignalTest)
async.CalculateRoute(Checkpoints({1, 2} /* start */, {5, 6} /* finish */), {3, 4}, false,
bind(ref(resultCallback), _1, _2) /* readyCallback */,
bind(ref(resultCallback), _1, _2) /* needMoreMapsCallback */,
- nullptr /* removeRouteCallback */, nullptr /* progressCallback */, 0);
+ nullptr /* removeRouteCallback */, nullptr /* progressCallback */);
resultCallback.WaitFinish();
@@ -143,7 +143,7 @@ UNIT_CLASS_TEST(AsyncGuiThreadTest, StandardAsyncFogTest)
async.SetRouter(move(router), move(fetcher));
async.CalculateRoute(Checkpoints({1, 2} /* start */, {5, 6} /* finish */), {3, 4}, false,
bind(ref(resultCallback), _1, _2), nullptr /* needMoreMapsCallback */,
- nullptr /* progressCallback */, nullptr /* removeRouteCallback */, 0);
+ nullptr /* progressCallback */, nullptr /* removeRouteCallback */);
resultCallback.WaitFinish();
diff --git a/routing/routing_tests/routing_algorithm.cpp b/routing/routing_tests/routing_algorithm.cpp
index ae32d60051..0bec7a4e12 100644
--- a/routing/routing_tests/routing_algorithm.cpp
+++ b/routing/routing_tests/routing_algorithm.cpp
@@ -192,9 +192,10 @@ TestAStarBidirectionalAlgo::Result TestAStarBidirectionalAlgo::CalculateRoute(
RoutingResult<IRoadGraph::Vertex, IRoadGraph::Weight> & path)
{
RoadGraph roadGraph(graph);
- base::Cancellable const cancellable;
+ base::Cancellable cancellable;
Algorithm::Params params(roadGraph, startPos, finalPos, {} /* prevRoute */,
- cancellable, {} /* onVisitJunctionFn */, {} /* checkLength */);
+ cancellable, {} /* onVisitJunctionFn */,
+ {} /* checkLength */);
Algorithm::Result const res = Algorithm().FindPathBidirectional(params, path);
return Convert(res);
}
diff --git a/routing/routing_tests/routing_session_test.cpp b/routing/routing_tests/routing_session_test.cpp
index f9fd641b96..fd08022ee8 100644
--- a/routing/routing_tests/routing_session_test.cpp
+++ b/routing/routing_tests/routing_session_test.cpp
@@ -153,8 +153,10 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestRouteBuilding)
LOG(LINFO, ("Ready"));
timedSignal.Signal();
},
- nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */, nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
+ nullptr /* removeRouteCallback */);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
});
// Manual check of the routeBuilding mutex to avoid spurious results.
@@ -185,7 +187,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestRouteRebuildingMovingA
[&alongTimedSignal](Route const &, RouterResultCode) { alongTimedSignal.Signal(); },
nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::RouterDelegate::kNoTimeout);
});
TEST(alongTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
TEST_EQUAL(counter, 1, ());
@@ -219,7 +222,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestRouteRebuildingMovingA
{SessionState::OnRoute, SessionState::RoutingNotActive, SessionState::RouteBuilding},
*m_session);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
}
});
TEST(oppositeTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
@@ -265,7 +269,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestRouteRebuildingMovingT
[&alongTimedSignal](Route const &, RouterResultCode) { alongTimedSignal.Signal(); },
nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
});
TEST(alongTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
TEST_EQUAL(counter, 1, ());
@@ -314,7 +319,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestFollowRouteFlagPersist
[&alongTimedSignal](Route const &, RouterResultCode) { alongTimedSignal.Signal(); },
nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
});
TEST(alongTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
@@ -342,7 +348,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestFollowRouteFlagPersist
[&oppositeTimedSignal](Route const &, RouterResultCode) { oppositeTimedSignal.Signal(); },
nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
});
TEST(oppositeTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
@@ -367,7 +374,7 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestFollowRouteFlagPersist
m_session->RebuildRoute(
kTestRoute.front(),
[&rebuildTimedSignal](Route const &, RouterResultCode) { rebuildTimedSignal.Signal(); },
- nullptr /* needMoreMapsCallback */, nullptr /* removeRouteCallback */, 0,
+ nullptr /* needMoreMapsCallback */, nullptr /* removeRouteCallback */, RouterDelegate::kNoTimeout,
SessionState::RouteBuilding, false /* adjust */);
});
TEST(rebuildTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));
@@ -401,7 +408,8 @@ UNIT_CLASS_TEST(AsyncGuiThreadTestWithRoutingSession, TestFollowRoutePercentTest
[&alongTimedSignal](Route const &, RouterResultCode) { alongTimedSignal.Signal(); },
nullptr /* rebuildReadyCallback */, nullptr /* needMoreMapsCallback */,
nullptr /* removeRouteCallback */);
- m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()), 0);
+ m_session->BuildRoute(Checkpoints(kTestRoute.front(), kTestRoute.back()),
+ RouterDelegate::kNoTimeout);
});
TEST(alongTimedSignal.WaitUntil(steady_clock::now() + kRouteBuildingMaxDuration), ("Route was not built."));