From 671d8488de3624151b9d9b7bfc5a7dd557ca0157 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 4 Dec 2017 18:10:50 +0300 Subject: [PATCH] Tests on removing equivalent edges. --- .../generator_tests/transit_graph_test.cpp | 46 +++++++++++++------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/generator/generator_tests/transit_graph_test.cpp b/generator/generator_tests/transit_graph_test.cpp index 8b4e168537..ca60fbba01 100644 --- a/generator/generator_tests/transit_graph_test.cpp +++ b/generator/generator_tests/transit_graph_test.cpp @@ -146,6 +146,22 @@ unique_ptr CreateGraphFromJson() "transfer": false, "weight" : 10 }, + { + "stop1_id": 3, + "stop2_id": 4, + "line_id": 1, + "shape_ids": [ { "stop1_id": 3, "stop2_id": 4 }], + "transfer": false, + "weight" : 20 + }, + { + "stop1_id": 3, + "stop2_id": 4, + "line_id": 1, + "shape_ids": [ { "stop1_id": 3, "stop2_id": 4 }], + "transfer": false, + "weight" : 20 + }, { "stop1_id": 5, "stop2_id": 6, @@ -503,15 +519,15 @@ void SerializeAndDeserializeGraph(GraphData const & src, GraphData & dst) TEST(dst.IsValid(), ()); } -// ^ -// | -// * 2 -// -// s0--------s1--------s2--------s3---s4 Line 1 -// -// * * * * * * * * --> -// -2 0 3 4 5 -// s5--------s6 Line 2 +// ^ +// | +// * 2 _______ +// | | +// s0----------s1----------s2----------s3----s4 Line 1 +// |_____| +// * * * * * * * * * --> +// -3 -2 -1 0 1 2 3 4 5 +// s5----------s6 Line 2 // UNIT_TEST(ClipGraph_SmokeTest) { @@ -532,10 +548,10 @@ UNIT_TEST(ClipGraph_SmokeTest) // // ------------------* 3-----------Border // | | -// | * 2 | -// | | +// | * 2 | _______ +// | | | | // | s0----------s1----------s2----|-----s3----s4 Line 1 -// | | +// | | |_____| // *-----*-----*-----*-----*-----*-----* * * --> // -3 -2 -1 0 1 2 3 4 5 // s5----------s6 Line 2 @@ -557,10 +573,10 @@ UNIT_TEST(ClipGraph_OneLineTest) // | // * 3 // -// * 2----------Border -// | | +// * 2----------Border _______ +// | | | | // s0----------s1-|--------s2-|--------s3----s4 Line 1 -// | | +// | | |_____| // * * * * | * * | * * * --> // -3 -2 -1 0 | 1 2 | 3 4 5 // Line 2 s5-------|--s6 |