diff options
author | tatiana-kondakova <tatiana.kondakova@gmail.com> | 2017-11-29 15:23:21 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <bykoianko@gmail.com> | 2017-11-30 07:23:00 +0300 |
commit | 52204f67fc5f24477ec264f41121fdc75ed3a583 (patch) | |
tree | 46e8c40ec77fb45ecf0686d046e79838d37df2fa /routing/routing_tests | |
parent | ca981fd6ad3ea56d46b7d9e897afd88c4faee10a (diff) |
Getting rid of |T| prefix and |Type| postfix
Diffstat (limited to 'routing/routing_tests')
-rw-r--r-- | routing/routing_tests/astar_algorithm_test.cpp | 16 | ||||
-rw-r--r-- | routing/routing_tests/astar_router_test.cpp | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/routing/routing_tests/astar_algorithm_test.cpp b/routing/routing_tests/astar_algorithm_test.cpp index 99bace87e1..b3012c98bc 100644 --- a/routing/routing_tests/astar_algorithm_test.cpp +++ b/routing/routing_tests/astar_algorithm_test.cpp @@ -26,9 +26,9 @@ struct Edge class UndirectedGraph { public: - using TVertexType = unsigned; - using TEdgeType = Edge; - using TWeightType = double; + using Vertex = unsigned; + using Edge = Edge; + using Weight = double; void AddEdge(unsigned u, unsigned v, unsigned w) { @@ -66,7 +66,7 @@ void TestAStar(UndirectedGraph & graph, vector<unsigned> const & expectedRoute, { TAlgorithm algo; - RoutingResult<unsigned /* VertexType */, double /* WeightType */> actualRoute; + RoutingResult<unsigned /* Vertex */, double /* Weight */> actualRoute; TEST_EQUAL(TAlgorithm::Result::OK, algo.FindPath(graph, 0u, 4u, actualRoute), ()); TEST_EQUAL(expectedRoute, actualRoute.m_path, ()); TEST_ALMOST_EQUAL_ULPS(expectedDistance, actualRoute.m_distance, ()); @@ -105,7 +105,7 @@ UNIT_TEST(AStarAlgorithm_CheckLength) graph.AddEdge(3, 4, 3); TAlgorithm algo; - RoutingResult<unsigned /* VertexType */, double /* WeightType */> routingResult; + RoutingResult<unsigned /* Vertex */, double /* Weight */> routingResult; TAlgorithm::Result result = algo.FindPath(graph, 0u, 4u, routingResult, {} /* cancellable */, {} /* onVisitedVertexCallback */, [](double weight) { return weight < 23; }); @@ -135,7 +135,7 @@ UNIT_TEST(AdjustRoute) vector<Edge> const prevRoute = {{0, 0}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}; TAlgorithm algo; - RoutingResult<unsigned /* VertexType */, double /* WeightType */> result; + RoutingResult<unsigned /* Vertex */, double /* Weight */> result; auto code = algo.AdjustRoute(graph, 6 /* start */, prevRoute, result, my::Cancellable(), nullptr /* onVisitedVertexCallback */, [](double weight){ return weight <= 1.0; }); @@ -157,7 +157,7 @@ UNIT_TEST(AdjustRouteNoPath) vector<Edge> const prevRoute = {{0, 0}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}; TAlgorithm algo; - RoutingResult<unsigned /* VertexType */, double /* WeightType */> result; + RoutingResult<unsigned /* Vertex */, double /* Weight */> result; auto code = algo.AdjustRoute(graph, 6 /* start */, prevRoute, result, my::Cancellable(), nullptr /* onVisitedVertexCallback */, [](double weight){ return weight <= 1.0; }); @@ -179,7 +179,7 @@ UNIT_TEST(AdjustRouteOutOfLimit) vector<Edge> const prevRoute = {{0, 0}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}}; TAlgorithm algo; - RoutingResult<unsigned /* VertexType */, double /* WeightType */> result; + RoutingResult<unsigned /* Vertex */, double /* Weight */> result; auto code = algo.AdjustRoute(graph, 6 /* start */, prevRoute, result, my::Cancellable(), nullptr /* onVisitedVertexCallback */, [](double weight){ return weight <= 1.0; }); diff --git a/routing/routing_tests/astar_router_test.cpp b/routing/routing_tests/astar_router_test.cpp index 0127a0485e..1b41e723e0 100644 --- a/routing/routing_tests/astar_router_test.cpp +++ b/routing/routing_tests/astar_router_test.cpp @@ -30,7 +30,7 @@ void TestAStarRouterMock(Junction const & startPos, Junction const & finalPos, InitRoadGraphMockSourceWithTest2(graph); RouterDelegate delegate; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TRoutingAlgorithm algorithm; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, startPos, finalPos, delegate, result), ()); @@ -98,7 +98,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_RouteIsFound) MakeJunctionForTesting(m2::PointD(0, 60)), MakeJunctionForTesting(m2::PointD(40, 100))}; RouterDelegate delegate; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TRoutingAlgorithm algorithm; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, startPos, finalPos, delegate, result), ()); @@ -167,7 +167,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_RoutesInConnectedComponents) { RouterDelegate delegate; Junction const finalPos = roadInfo_2[j].m_junctions[0]; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TEST_EQUAL(TRoutingAlgorithm::Result::NoPath, algorithm.CalculateRoute(graph, startPos, finalPos, delegate, result), ()); TEST_EQUAL(TRoutingAlgorithm::Result::NoPath, @@ -183,7 +183,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_RoutesInConnectedComponents) { RouterDelegate delegate; Junction const finalPos = roadInfo_1[j].m_junctions[0]; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, startPos, finalPos, delegate, result), ()); TEST_EQUAL(TRoutingAlgorithm::Result::OK, @@ -199,7 +199,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_RoutesInConnectedComponents) { RouterDelegate delegate; Junction const finalPos = roadInfo_2[j].m_junctions[0]; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, startPos, finalPos, delegate, result), ()); TEST_EQUAL(TRoutingAlgorithm::Result::OK, @@ -227,7 +227,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_PickTheFasterRoad1) // path3 = 1/5 + 8/4 + 1/5 = 2.4 RouterDelegate delegate; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TRoutingAlgorithm algorithm; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, MakeJunctionForTesting(m2::PointD(2, 2)), @@ -262,7 +262,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_PickTheFasterRoad2) // path3 = 1/5 + 8/4.4 + 1/5 = 2.2 RouterDelegate delegate; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TRoutingAlgorithm algorithm; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, MakeJunctionForTesting(m2::PointD(2, 2)), @@ -294,7 +294,7 @@ UNIT_TEST(AStarRouter_SimpleGraph_PickTheFasterRoad3) // path3 = 1/5 + 8/4.9 + 1/5 = 2.03 RouterDelegate delegate; - RoutingResult<Junction, double /* WeightType */> result; + RoutingResult<Junction, double /* Weight */> result; TRoutingAlgorithm algorithm; TEST_EQUAL(TRoutingAlgorithm::Result::OK, algorithm.CalculateRoute(graph, MakeJunctionForTesting(m2::PointD(2, 2)), |