From 9ab1214aca7d77e1083476b05c6ddc2bb351bbac Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Nov 2023 19:09:58 +0000 Subject: More tests can just use the global fixed data --- test/test-geoData.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/test-geoData.cpp b/test/test-geoData.cpp index b33c61e..258bd9c 100644 --- a/test/test-geoData.cpp +++ b/test/test-geoData.cpp @@ -49,27 +49,27 @@ BOOST_AUTO_TEST_CASE(trianglesContainsPoints) } } +BOOST_AUTO_TEST_SUITE_END(); + +static const TestTerrainMesh fixedTerrtain; + BOOST_AUTO_TEST_CASE(locatePointFace) { - const PointFace pf {{310002, 490003}}; + const GeoData::PointFace pf {{310002, 490003}}; BOOST_CHECK(!pf.isLocated()); - BOOST_CHECK(pf.face(this).is_valid()); - BOOST_CHECK_EQUAL(pf.face(this).idx(), 0); + BOOST_CHECK(pf.face(&fixedTerrtain).is_valid()); + BOOST_CHECK_EQUAL(pf.face(&fixedTerrtain).idx(), 0); } BOOST_AUTO_TEST_CASE(preLocatePointFace) { - const PointFace pf {{310002, 490003}, this}; + const GeoData::PointFace pf {{310002, 490003}, &fixedTerrtain}; BOOST_CHECK(pf.isLocated()); - BOOST_CHECK_EQUAL(pf.face(this).idx(), 0); + BOOST_CHECK_EQUAL(pf.face(&fixedTerrtain).idx(), 0); } -BOOST_AUTO_TEST_SUITE_END(); - using FindPointData = std::tuple; -static const TestTerrainMesh fixedTerrtain; - // No boundary cases as these can produce different valid results depending on starting point BOOST_DATA_TEST_CASE(findPointOnTerrain, boost::unit_test::data::make({ -- cgit v1.2.3