summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-geoData.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test-geoData.cpp b/test/test-geoData.cpp
index 589f675..dd68375 100644
--- a/test/test-geoData.cpp
+++ b/test/test-geoData.cpp
@@ -148,8 +148,11 @@ BOOST_DATA_TEST_CASE(walkTerrain,
from, to, visits)
{
std::vector<int> visited;
- BOOST_CHECK_NO_THROW(fixedTerrtain.walk(from, to, [&visited](auto fh) {
- visited.emplace_back(fh.idx());
+ BOOST_CHECK_NO_THROW(fixedTerrtain.walk(from, to, [&visited](auto step) {
+ if (!visited.empty()) {
+ BOOST_CHECK_EQUAL(step.previous.idx(), visited.back());
+ }
+ visited.emplace_back(step.current.idx());
}));
BOOST_CHECK_EQUAL_COLLECTIONS(visited.begin(), visited.end(), visits.begin(), visits.end());
}
@@ -181,8 +184,8 @@ BOOST_DATA_TEST_CASE(walkTerrainUntil,
from, to, visits)
{
std::vector<int> visited;
- BOOST_CHECK_NO_THROW(fixedTerrtain.walkUntil(from, to, [&visited](auto fh) {
- visited.emplace_back(fh.idx());
+ BOOST_CHECK_NO_THROW(fixedTerrtain.walkUntil(from, to, [&visited](const auto & step) {
+ visited.emplace_back(step.current.idx());
return visited.size() >= 5;
}));
BOOST_CHECK_EQUAL_COLLECTIONS(visited.begin(), visited.end(), visits.begin(), visits.end());