MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / TEST_F

Function TEST_F

isis/tests/FunctionalTestsCnetdiff.cpp:578–696  ·  view source on GitHub ↗

* CompareNetsReportFirst * * Runs 4 comparisons between binary control nets (reporting only * the first difference)... * a) cnet1 vs cnet1, should be identical * b) cnet2 vs cnet2, should be identical * c) cnet1 vs cnet2 * d) cnet1 vs cnet2 with sample residual tolerance of 1.5 * given in the input file diffs1.txt */

Source from the content-addressed store, hash-verified

576 * given in the input file diffs1.txt
577 */
578TEST_F(CompareNetsReportFirstDiff, FunctionalTestCnetdiffReportFirst) {
579 QVector<QString> args = {"from=" + cnetFile1,
580 "from2=" + cnetFile1,
581 "to=" + tempDir.path() + "/compareSame1.txt"
582 };
583
584 UserInterface ui1(APP_XML, args);
585
586 Pvl log;
587
588 try {
589 log = cnetdiff(ui1);
590 }
591 catch(IException &e) {
592 FAIL() << e.toString().toStdString().c_str() << std::endl;
593 }
594
595 // read back CompareSame1 output file
596 Pvl comparePvlSame1;
597 try {
598 comparePvlSame1.read(tempDir.path()+ "/compareSame1.txt");
599 }
600 catch (IException &e) {
601 FAIL() << "Unable to open error log pvl file: " << e.what() << std::endl;
602 }
603
604 PvlGroup &results = comparePvlSame1.findGroup("Results", Pvl::Traverse);
605 EXPECT_EQ(results["Compare"][0].toStdString(), "Identical");
606
607 // cnet2 vs cnet2
608 args = {"from=" + cnetFile2,
609 "from2=" + cnetFile2,
610 "to=" + tempDir.path() + "/compareSame2.txt"
611 };
612
613 UserInterface ui2(APP_XML, args);
614
615 try {
616 log = cnetdiff(ui2);
617 }
618 catch(IException &e) {
619 FAIL() << e.toString().toStdString().c_str() << std::endl;
620 }
621
622 // read back CompareSame2 output file
623 Pvl comparePvlSame2;
624 try {
625 comparePvlSame2.read(tempDir.path()+ "/compareSame2.txt");
626 }
627 catch (IException &e) {
628 FAIL() << "Unable to open error log pvl file: " << e.what() << std::endl;
629 }
630
631 results = comparePvlSame2.findGroup("Results", Pvl::Traverse);
632 EXPECT_EQ(results["Compare"][0].toStdString(), "Identical");
633
634 // cnet1 vs cnet2
635 args = {"from=" + cnetFile1,

Callers

nothing calls this directly

Calls 13

cnetdiffFunction · 0.85
findGroupMethod · 0.80
hasObjectMethod · 0.80
findObjectMethod · 0.80
groupsMethod · 0.80
objectsMethod · 0.80
keywordsMethod · 0.80
deleteObjectMethod · 0.80
pathMethod · 0.45
toStringMethod · 0.45
readMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected