From 9ae29335b72b6db037a78428ff8493d1fb587103 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 2 Dec 2023 16:38:12 +0000 Subject: Test case for finding ray entry points --- test/test-geoData.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test-geoData.cpp b/test/test-geoData.cpp index 164a6a5..d1c6b8b 100644 --- a/test/test-geoData.cpp +++ b/test/test-geoData.cpp @@ -186,3 +186,16 @@ BOOST_DATA_TEST_CASE(walkTerrainUntil, })); BOOST_CHECK_EQUAL_COLLECTIONS(visited.begin(), visited.end(), visits.begin(), visits.end()); } + +using FindEntiesData = std::tuple; + +BOOST_DATA_TEST_CASE(findEntries, + boost::unit_test::data::make({ + {{307739360, 494851616}, {314056992, 500079744}, 160667}, + {{308597952, 498417056}, {315154144, 504671456}, 233623}, + {{302690592, 502270912}, {311585184, 497868064}, 207311}, + }), + from, to, heh) +{ + BOOST_CHECK_EQUAL(fixedTerrtain.findEntry(from, to).idx(), heh); +} -- cgit v1.2.3