[geos-commits] [SCM] GEOS branch master updated. 5b7778bf0915e03c3600f536b44d717de861457f

git at osgeo.org git at osgeo.org
Wed Apr 29 20:41:09 PDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  5b7778bf0915e03c3600f536b44d717de861457f (commit)
      from  0251b0fb2dccd522aca73f25465082b5af63bd6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5b7778bf0915e03c3600f536b44d717de861457f
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed Apr 29 23:40:54 2020 -0400

    Fix invalid reads in LEC and MIC tests

diff --git a/tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp b/tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp
index a424772..532a8e0 100644
--- a/tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp
+++ b/tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp
@@ -81,8 +81,8 @@ struct test_lec_data {
         // std::cout << writer_.write(radiusLine.get()) << std::endl;
 
         ensure_equals_coordinate(*centerPt, linePt0, tolerance);
-        const Coordinate* radiusPt = lec.getRadiusPoint()->getCoordinate();
-        ensure_equals_coordinate(*radiusPt, linePt1, tolerance);
+        const Coordinate radiusPt = *lec.getRadiusPoint()->getCoordinate();
+        ensure_equals_coordinate(radiusPt, linePt1, tolerance);
     }
 
     void
@@ -99,10 +99,8 @@ struct test_lec_data {
         const Coordinate& linePt1 = radiusLine->getCoordinateN(1);
 
         ensure_equals_coordinate(*centerPt, linePt0, tolerance);
-        const Coordinate* radiusPt = lec.getRadiusPoint()->getCoordinate();
-        ensure_equals_coordinate(*radiusPt, linePt1, tolerance);
-
-
+        const Coordinate radiusPt = *lec.getRadiusPoint()->getCoordinate();
+        ensure_equals_coordinate(radiusPt, linePt1, tolerance);
     }
 
     void
diff --git a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
index 59c674d..73784f5 100644
--- a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
+++ b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
@@ -80,8 +80,8 @@ struct test_mic_data {
         // std::cout << writer_.write(radiusLine.get()) << std::endl;
 
         ensure_equals_coordinate(*centerPt, linePt0, tolerance);
-        const Coordinate* radiusPt = mic.getRadiusPoint()->getCoordinate();
-        ensure_equals_coordinate(*radiusPt, linePt1, tolerance);
+        const Coordinate radiusPt = *mic.getRadiusPoint()->getCoordinate();
+        ensure_equals_coordinate(radiusPt, linePt1, tolerance);
     }
 
     void

-----------------------------------------------------------------------

Summary of changes:
 tests/unit/algorithm/construct/LargestEmptyCircleTest.cpp     | 10 ++++------
 tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp |  4 ++--
 2 files changed, 6 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list