diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2017-12-14 13:21:02 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-12-18 15:46:52 +0300 |
commit | 7bbdf851e0ddbf1027cb5158c150697ef8bf9e50 (patch) | |
tree | 89af2da8f402373d4533f7cd5207a5613aea54e0 /routing/routing_tests | |
parent | 8c00581c6b2562d7ae7b86ee096ac6efd0a266f7 (diff) |
[routing] Make fake edges that are part of real remember their real analog.
Diffstat (limited to 'routing/routing_tests')
-rw-r--r-- | routing/routing_tests/index_graph_test.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/routing/routing_tests/index_graph_test.cpp b/routing/routing_tests/index_graph_test.cpp index de43bd8d5a..584cd35035 100644 --- a/routing/routing_tests/index_graph_test.cpp +++ b/routing/routing_tests/index_graph_test.cpp @@ -713,9 +713,9 @@ UNIT_TEST(IndexGraph_OnlyTopology_3) UNIT_TEST(BestEdgeComparator_OneCodirectionalEdge) { Edge const edge1 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.0}), - MakeJunctionForTesting({-0.002, 0.002}), true /* partOfReal */); + MakeJunctionForTesting({-0.002, 0.002})); Edge const edge2 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.0}), - MakeJunctionForTesting({0.002, 0.0}), true /* partOfReal */); + MakeJunctionForTesting({0.002, 0.0})); IndexRouter::BestEdgeComparator bestEdgeComparator(m2::PointD(0.0, 0.0), m2::PointD(0.0, 0.001)); TEST_EQUAL(bestEdgeComparator.Compare(edge1, edge2), -1, ()); @@ -737,9 +737,9 @@ UNIT_TEST(BestEdgeComparator_OneCodirectionalEdge) UNIT_TEST(BestEdgeComparator_TwoCodirectionalEdges) { Edge const edge1 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.0}), - MakeJunctionForTesting({-0.002, 0.004}), true /* partOfReal */); + MakeJunctionForTesting({-0.002, 0.004})); Edge const edge2 = Edge::MakeFake(MakeJunctionForTesting({0.0, 0.0}), - MakeJunctionForTesting({0.0, 0.002}), true /* partOfReal */); + MakeJunctionForTesting({0.0, 0.002})); IndexRouter::BestEdgeComparator bestEdgeComparator(m2::PointD(0.0, 0.0), m2::PointD(0.0, 0.001)); TEST_EQUAL(bestEdgeComparator.Compare(edge1, edge2), 1, ()); @@ -756,9 +756,9 @@ UNIT_TEST(BestEdgeComparator_TwoCodirectionalEdges) UNIT_TEST(BestEdgeComparator_TwoNotCodirectionalEdges) { Edge const edge1 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.002}), - MakeJunctionForTesting({0.002, 0.002}), true /* partOfReal */); + MakeJunctionForTesting({0.002, 0.002})); Edge const edge2 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.0}), - MakeJunctionForTesting({0.002, 0.0}), true) /* partOfReal */; + MakeJunctionForTesting({0.002, 0.0})); IndexRouter::BestEdgeComparator bestEdgeComparator(m2::PointD(0.0, 0.0), m2::PointD(0.0, 0.001)); TEST_EQUAL(bestEdgeComparator.Compare(edge1, edge2), 1, ()); @@ -774,9 +774,8 @@ UNIT_TEST(BestEdgeComparator_TwoNotCodirectionalEdges) UNIT_TEST(BestEdgeComparator_TwoEdgesOfOneFeature) { // Please see a note in class Edge definition about start and end point of Edge. - Edge const edge1 = Edge::MakeFakeForTesting(MakeJunctionForTesting({-0.002, 0.0}), - MakeJunctionForTesting({0.002, 0.0}), - true /* partOfReal */, true /* forward */); + Edge const edge1 = Edge::MakeFake(MakeJunctionForTesting({-0.002, 0.0}), + MakeJunctionForTesting({0.002, 0.0})); Edge const edge2 = edge1.GetReverseEdge(); IndexRouter::BestEdgeComparator bestEdgeComparator(m2::PointD(0.0, 0.001), m2::PointD(0.001, 0.0)); |