Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajari committed Dec 13, 2016
1 parent 1a287db commit 0e76783
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
40 changes: 3 additions & 37 deletions features/testbot/trip.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ Feature: Basic trip planning
| a,b,c,d,e,f,g,h,i,j,k,l | cbalkjihgfedc |


Scenario: Testbot - Trip planning with less than 10 nodes with fixed start and end
Scenario: Testbot - Trip planning with fixed start and end
Given the query options
| source | 1 |
| destination | 4 |
| source | 0 |
| destination | 3 |

Given the node map
"""
Expand All @@ -78,40 +78,6 @@ Feature: Basic trip planning
| d,b,c,a | dbcad | 7.6 |


Scenario: Testbot - Trip planning with more than 10 nodes with fixed start and end
Given the query options
| source | 1 |
| destination | 12 |

Given the node map
"""
a b c d
l e
k f
j i h g
"""

And the ways
| nodes |
| ab |
| bc |
| cb |
| de |
| ef |
| fg |
| gh |
| hi |
| ij |
| jk |
| kl |
| la |


When I plan a trip I should get
| waypoints | trips |
| a,b,c,d,e,f,g,h,i,j,k,l | cbalkjihgfedc |


Scenario: Testbot - Trip planning with multiple scc
Given the node map
"""
Expand Down
4 changes: 4 additions & 0 deletions src/engine/plugins/trip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ Status TripPlugin::HandleRequest(const std::shared_ptr<datafacade::BaseDataFacad
return Status::Error;
}

std::for_each(std::begin(result_table), std::end(result_table), [](const auto value) {
std::cout << "table_value: " << value << std::endl;
});

const constexpr std::size_t BF_MAX_FEASABLE = 10;
BOOST_ASSERT_MSG(result_table.size() == number_of_locations * number_of_locations,
"Distance Table has wrong size");
Expand Down

0 comments on commit 0e76783

Please sign in to comment.