Loading isis/tests/FunctionalTestsFindimageoverlaps.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -29,28 +29,21 @@ using namespace Isis; static QString APP_XML = FileName("$ISISROOT/bin/xml/findimageoverlaps.xml").expanded(); TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { std::cout << "1 ------------" << std::endl; ImagePolygon fp1; std::cout << "1.1 ------------" << std::endl; fp1.Create(*cube1); std::cout << "1.2 ------------" << std::endl; cube1->write(fp1); std::cout << "2 ------------" << std::endl; Cube newCube2; json newIsd2; std::ifstream i(isdPath2->expanded().toStdString()); i >> newIsd2; std::cout << "3 ------------" << std::endl; newIsd2["instrument_position"]["positions"] = {{1,1,1}, {2,2,2}, {3,3,3}}; newCube2.fromIsd(tempDir.path()+"/new2.cub", *cube2->label(), newIsd2, "rw"); std::cout << "4 ------------" << std::endl; ImagePolygon fp2; fp2.Create(newCube2); newCube2.write(fp2); std::cout << "5 ------------" << std::endl; FileList cubes; cubes.append(cube1->fileName()); Loading @@ -58,14 +51,12 @@ TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { cube1->close(); cube2->close(); newCube2.close(); std::cout << "6 ------------" << std::endl; QString cubeListPath = tempDir.path() + "/cubes.lis"; cubes.write(cubeListPath); QVector<QString> args = {"from="+cubeListPath, "overlapList="+tempDir.path()+"/overlaps.txt"}; UserInterface options(APP_XML, args); Pvl appLog; std::cout << "7 ------------" << std::endl; try { findimageoverlaps(options, false, &appLog); Loading @@ -75,8 +66,6 @@ TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { EXPECT_TRUE(e.toString().toLatin1().contains("No overlaps were found")) << e.toString().toStdString(); } std::cout << "8 ------------" << std::endl; } TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsTwoImageOverlap) { Loading isis/tests/UnitTestImagePolygon.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ TEST_F(TempTestingFiles, UnitTestImagePolygonCross) { ImagePolygon poly; try { std::cout << "cross 1=====" << std::endl; poly.Create(crossCube, 100, 100); } catch(IException &e) { Loading @@ -85,13 +86,18 @@ TEST_F(TempTestingFiles, UnitTestImagePolygonCross) { } ASSERT_EQ(40, poly.numVertices()); std::cout << "cross 1=====" << std::endl; geos::geom::Geometry* boundary = poly.Polys()->getEnvelope().release(); std::cout << "cross 1.1 =====" << std::endl; geos::geom::Point* centroid = poly.Polys()->getCentroid().release(); std::cout << "cross 2=====" << std::endl; std::vector<double> lons = {0.000000, 360.000000, 360.000000, 0.000000, 0.000000}; std::vector<double> lats = {54.208706, 54.208706, 77.858556, 77.858556, 54.208706}; geos::geom::CoordinateArraySequence coordArray = geos::geom::CoordinateArraySequence(*(boundary->getCoordinates())); std::cout << "cross 3=====" << std::endl; for (size_t i = 0; i < coordArray.getSize(); i++) { EXPECT_NEAR(lons[i], coordArray.getAt(i).x, 1e-6); EXPECT_NEAR(lats[i], coordArray.getAt(i).y, 1e-6); Loading Loading
isis/tests/FunctionalTestsFindimageoverlaps.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -29,28 +29,21 @@ using namespace Isis; static QString APP_XML = FileName("$ISISROOT/bin/xml/findimageoverlaps.xml").expanded(); TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { std::cout << "1 ------------" << std::endl; ImagePolygon fp1; std::cout << "1.1 ------------" << std::endl; fp1.Create(*cube1); std::cout << "1.2 ------------" << std::endl; cube1->write(fp1); std::cout << "2 ------------" << std::endl; Cube newCube2; json newIsd2; std::ifstream i(isdPath2->expanded().toStdString()); i >> newIsd2; std::cout << "3 ------------" << std::endl; newIsd2["instrument_position"]["positions"] = {{1,1,1}, {2,2,2}, {3,3,3}}; newCube2.fromIsd(tempDir.path()+"/new2.cub", *cube2->label(), newIsd2, "rw"); std::cout << "4 ------------" << std::endl; ImagePolygon fp2; fp2.Create(newCube2); newCube2.write(fp2); std::cout << "5 ------------" << std::endl; FileList cubes; cubes.append(cube1->fileName()); Loading @@ -58,14 +51,12 @@ TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { cube1->close(); cube2->close(); newCube2.close(); std::cout << "6 ------------" << std::endl; QString cubeListPath = tempDir.path() + "/cubes.lis"; cubes.write(cubeListPath); QVector<QString> args = {"from="+cubeListPath, "overlapList="+tempDir.path()+"/overlaps.txt"}; UserInterface options(APP_XML, args); Pvl appLog; std::cout << "7 ------------" << std::endl; try { findimageoverlaps(options, false, &appLog); Loading @@ -75,8 +66,6 @@ TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsNoOverlap) { EXPECT_TRUE(e.toString().toLatin1().contains("No overlaps were found")) << e.toString().toStdString(); } std::cout << "8 ------------" << std::endl; } TEST_F(ThreeImageNetwork, FunctionalTestFindimageoverlapsTwoImageOverlap) { Loading
isis/tests/UnitTestImagePolygon.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ TEST_F(TempTestingFiles, UnitTestImagePolygonCross) { ImagePolygon poly; try { std::cout << "cross 1=====" << std::endl; poly.Create(crossCube, 100, 100); } catch(IException &e) { Loading @@ -85,13 +86,18 @@ TEST_F(TempTestingFiles, UnitTestImagePolygonCross) { } ASSERT_EQ(40, poly.numVertices()); std::cout << "cross 1=====" << std::endl; geos::geom::Geometry* boundary = poly.Polys()->getEnvelope().release(); std::cout << "cross 1.1 =====" << std::endl; geos::geom::Point* centroid = poly.Polys()->getCentroid().release(); std::cout << "cross 2=====" << std::endl; std::vector<double> lons = {0.000000, 360.000000, 360.000000, 0.000000, 0.000000}; std::vector<double> lats = {54.208706, 54.208706, 77.858556, 77.858556, 54.208706}; geos::geom::CoordinateArraySequence coordArray = geos::geom::CoordinateArraySequence(*(boundary->getCoordinates())); std::cout << "cross 3=====" << std::endl; for (size_t i = 0; i < coordArray.getSize(); i++) { EXPECT_NEAR(lons[i], coordArray.getAt(i).x, 1e-6); EXPECT_NEAR(lats[i], coordArray.getAt(i).y, 1e-6); Loading