[mapguide-commits] r9671 - sandbox/jng/catch2/Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Jul 15 06:31:29 PDT 2020
Author: jng
Date: 2020-07-15 06:31:28 -0700 (Wed, 15 Jul 2020)
New Revision: 9671
Modified:
sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp
Log:
Add more assertions
Modified: sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp 2020-07-15 13:20:48 UTC (rev 9670)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestGeometry.cpp 2020-07-15 13:31:28 UTC (rev 9671)
@@ -1111,6 +1111,7 @@
point = CreatePoint();
polygon = CreatePolygon();
geom = point->Intersection(polygon);
+ REQUIRE(geom.p != nullptr);
STRING found = readerWriter.Write(geom);
REQUIRE(CheckGeometry(found, base));
@@ -1123,6 +1124,7 @@
base = L"LINESTRING (0 1, 2 3, 4 5)";
polygon = CreatePolygon();
geom = polygon->Intersection(lineString);
+ REQUIRE(geom.p != nullptr);
found = readerWriter.Write(geom);
REQUIRE(CheckGeometry(found, base));
@@ -1130,6 +1132,7 @@
base = L"GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0.99246192690647705, 0.045672548622950601 1.1204286132756418, 0.1310606385532562 1.2912047931362536, 0.23641094695643791 1.4504434254749068, 0.3601872291077422 1.5958224524579303, 0.50058454809348885 1.7252219205068542, 0.65555559485563741 1.8367548939952993, 0.82284054256798778 1.9287949710194192, 1 2, 1.5 1.5, 2 1, 3 0, 3 0, 3 2))";
Ptr<MgCurveString> curveString = CreateCurveString(0.0);
geom = curveString->Intersection(polygon);
+ REQUIRE(geom.p != nullptr);
found = readerWriter.Write(geom);
REQUIRE(CheckGeometry(found, base));
@@ -1147,6 +1150,7 @@
base = L"MULTIPOINT (1 2, 4 5)";
Ptr<MgMultiLineString> multiLineString = CreateMultiLineString();
geom = multiLineString->Intersection(multiPoint);
+ REQUIRE(geom.p != nullptr);
found = readerWriter.Write(geom);
REQUIRE(CheckGeometry(found, base));
@@ -1154,6 +1158,7 @@
base = L"LINESTRING (0 1, 3 4, 4 5)";
Ptr<MgMultiPolygon> multiPolygon = CreateMultiPolygon();
geom = multiPolygon->Intersection(multiLineString);
+ REQUIRE(geom.p != nullptr);
found = readerWriter.Write(geom);
REQUIRE(CheckGeometry(found, base));
More information about the mapguide-commits
mailing list