From a0f1dc90aabd4cb5cfe2aef7116af170e6d0b953 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 31 Oct 2023 01:26:58 +0000 Subject: Helper type for storing/passing/returning a point and its containing face point is const as face is mutable as a cache of the face containing point. --- test/test-terrain.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/test-terrain.cpp b/test/test-terrain.cpp index 429207c..f737f4f 100644 --- a/test/test-terrain.cpp +++ b/test/test-terrain.cpp @@ -46,6 +46,15 @@ BOOST_AUTO_TEST_CASE(trianglesContainsPoints) } } +BOOST_AUTO_TEST_CASE(locatePointFace) +{ + const PointFace pf {{310002, 490003}}; + BOOST_CHECK(!pf.face.is_valid()); + BOOST_CHECK(locate(pf)); + BOOST_CHECK(pf.face.is_valid()); + BOOST_CHECK_EQUAL(pf.face.idx(), 0); +} + BOOST_AUTO_TEST_SUITE_END(); using FindPointData = std::tuple; -- cgit v1.2.3