From da6c16f96aada147d6b467fb7e097dba3f2db75c Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 17 Jun 2015 09:30:58 +0200 Subject: [PATCH] [T/GL] Set point ids in test. --- ...tComputeAndInsertAllIntersectionPoints.cpp | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Tests/GeoLib/TestComputeAndInsertAllIntersectionPoints.cpp b/Tests/GeoLib/TestComputeAndInsertAllIntersectionPoints.cpp index b3dee1da88e..390383798e8 100644 --- a/Tests/GeoLib/TestComputeAndInsertAllIntersectionPoints.cpp +++ b/Tests/GeoLib/TestComputeAndInsertAllIntersectionPoints.cpp @@ -23,21 +23,22 @@ TEST(GeoLib, TestComputeAndInsertAllIntersectionPoints) { // *** insert points in vector std::vector<GeoLib::Point*> *pnts(new std::vector<GeoLib::Point*>); - pnts->push_back(new GeoLib::Point(0.0,0.0,0.0)); - pnts->push_back(new GeoLib::Point(11.0,0.0,0.0)); + pnts->push_back(new GeoLib::Point(0.0,0.0,0.0,0)); + pnts->push_back(new GeoLib::Point(11.0,0.0,0.0,1)); + + pnts->push_back(new GeoLib::Point(0.0,1.0,0.0,2)); + pnts->push_back(new GeoLib::Point(1.0,-1.0,0.0,3)); + pnts->push_back(new GeoLib::Point(2.0, 1.0,0.0,4)); + pnts->push_back(new GeoLib::Point(3.0,-1.0,0.0,5)); + pnts->push_back(new GeoLib::Point(4.0, 1.0,0.0,6)); + pnts->push_back(new GeoLib::Point(5.0,-1.0,0.0,7)); + pnts->push_back(new GeoLib::Point(6.0, 1.0,0.0,8)); + pnts->push_back(new GeoLib::Point(7.0,-1.0,0.0,9)); + pnts->push_back(new GeoLib::Point(8.0, 1.0,0.0,10)); + pnts->push_back(new GeoLib::Point(9.0,-1.0,0.0,11)); + pnts->push_back(new GeoLib::Point(10.0, 1.0,0.0,12)); + pnts->push_back(new GeoLib::Point(11.0,-1.0,0.0,13)); - pnts->push_back(new GeoLib::Point(0.0,1.0,0.0)); - pnts->push_back(new GeoLib::Point(1.0,-1.0,0.0)); - pnts->push_back(new GeoLib::Point(2.0, 1.0,0.0)); - pnts->push_back(new GeoLib::Point(3.0,-1.0,0.0)); - pnts->push_back(new GeoLib::Point(4.0, 1.0,0.0)); - pnts->push_back(new GeoLib::Point(5.0,-1.0,0.0)); - pnts->push_back(new GeoLib::Point(6.0, 1.0,0.0)); - pnts->push_back(new GeoLib::Point(7.0,-1.0,0.0)); - pnts->push_back(new GeoLib::Point(8.0, 1.0,0.0)); - pnts->push_back(new GeoLib::Point(9.0,-1.0,0.0)); - pnts->push_back(new GeoLib::Point(10.0, 1.0,0.0)); - pnts->push_back(new GeoLib::Point(11.0,-1.0,0.0)); GeoLib::GEOObjects geo_objs; std::string geo_name("TestGeometry"); @@ -48,7 +49,7 @@ TEST(GeoLib, TestComputeAndInsertAllIntersectionPoints) ply0->addPoint(0); ply0->addPoint(1); GeoLib::Polyline* ply1(new GeoLib::Polyline(*pnts)); - for (std::size_t k(2); k<14; k++) + for (std::size_t k(2); k<pnts->size(); ++k) ply1->addPoint(k); std::vector<GeoLib::Polyline*>* plys(new std::vector<GeoLib::Polyline*>); plys->push_back(ply0); -- GitLab