Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalized test names and file names #4366

Merged
merged 2 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ using namespace Isis;

static QString APP_XML = FileName("$ISISROOT/bin/xml/apollocal.xml").expanded();

TEST_F(ApolloCube, FunctionalTestApolloCalDefault) {
TEST_F(ApolloCube, FunctionalTestApollocalDefault) {
QTemporaryDir prefix;

QString outCubeFileName = prefix.path()+"/outTEMP.cub";
QVector<QString> args = {"to="+outCubeFileName};

UserInterface options(APP_XML, args);

try {
apollocal(testCube, options);
}
catch (IException &e) {
FAIL() << "Call failed, Unable to process cube: " << e.what() << std::endl;
}

Cube oCube(outCubeFileName, "r");
Cube oCube(outCubeFileName, "r");

std::unique_ptr<Histogram> oCubeStats(oCube.histogram());
EXPECT_NEAR(oCubeStats->Average(), -124.188, 0.001);
EXPECT_NEAR(oCubeStats->Sum(), -65125546242.836, 0.001);
EXPECT_NEAR(oCubeStats->ValidPixels(), 524410000, 0.001);
EXPECT_NEAR(oCubeStats->StandardDeviation(), 1056.736, 0.001);

EXPECT_NEAR(oCubeStats->Average(), -124.188, 0.001);
EXPECT_NEAR(oCubeStats->Sum(), -65125546242.836, 0.001);
EXPECT_NEAR(oCubeStats->ValidPixels(), 524410000, 0.001);
EXPECT_NEAR(oCubeStats->StandardDeviation(), 1056.736, 0.001);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ using namespace Isis;

static QString APP_XML = FileName("$ISISROOT/bin/xml/apollofindrx.xml").expanded();

TEST_F(LargeCube, FunctionalTestApolloFindRxDefault) {
TEST_F(LargeCube, FunctionalTestApollofindrxDefault) {

PvlGroup reseaus("Reseaus");
PvlKeyword samples = PvlKeyword("Sample", "200");
samples += "400";
samples += "600";
samples += "400";
samples += "600";

PvlKeyword lines = PvlKeyword("Line", "200");
lines += "400";
lines += "600";
lines += "400";
lines += "600";

PvlKeyword types = PvlKeyword("Type", "5");
types += "5";
types += "5";
types += "5";
types += "5";

PvlKeyword valid = PvlKeyword("Valid", "1");
valid += "1";
valid += "1";
valid += "1";
valid += "1";

reseaus += lines;
reseaus += samples;
reseaus += lines;
reseaus += samples;
reseaus += types;
reseaus += valid;
reseaus += valid;
reseaus += PvlKeyword("Status", "Nominal");

std::istringstream instStr (R"(
Group = Instrument
SpacecraftName = "APOLLO 15"
Expand All @@ -44,16 +44,16 @@ TEST_F(LargeCube, FunctionalTestApolloFindRxDefault) {
StartTime = 1971-08-01T14:58:03.78
End_Group
)");
PvlGroup instGroup;
instStr >> instGroup;

PvlGroup instGroup;
instStr >> instGroup;

Pvl *lab = testCube->label();
lab->findObject("IsisCube").addGroup(reseaus);
lab->findObject("IsisCube").addGroup(instGroup);

testCube->reopen("r");

QTemporaryDir prefix;
QVector<QString> args = {"tolerance=0.5", "patternsize=201"};

Expand All @@ -72,12 +72,12 @@ TEST_F(LargeCube, FunctionalTestApolloFindRxDefault) {
EXPECT_NEAR(testKeyword[0].toDouble(), 100.8141, 0.0001);
EXPECT_NEAR(testKeyword[1].toDouble(), 192.8, 0.0001);
EXPECT_NEAR(testKeyword[2].toDouble(), 275.8, 0.0001);

testKeyword = newReseaus.findKeyword("Sample");
EXPECT_NEAR(testKeyword[0].toDouble(), 100.8141, 0.0001);
EXPECT_NEAR(testKeyword[1].toDouble(), 192.8, 0.0001);
EXPECT_NEAR(testKeyword[2].toDouble(), 167.8, 0.0001);

testKeyword = newReseaus.findKeyword("Valid");
EXPECT_EQ(testKeyword[0].toInt(), 1);
EXPECT_EQ(testKeyword[1].toInt(), 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using namespace Isis;

static QString APP_XML = FileName("$ISISROOT/bin/xml/apollopanstitcher.xml").expanded();

TEST_F(TempTestingFiles, FunctionalTestsApolloPanStitcherDefault) {
TEST_F(TempTestingFiles, FunctionalTestApollopanstitcherDefault) {
QVector<QString> args = {"file_base=$ISISTESTDATA/isis/src/apollo/apps/apollopanstitcher/tsts/default/input/AS15_P_0177R10",
"to=" + tempDir.path() + "/reduced8.cub",
"microns=50"};
Expand All @@ -32,7 +32,7 @@ TEST_F(TempTestingFiles, FunctionalTestsApolloPanStitcherDefault) {
FAIL() << "Unable to stitcher apollo images: " << e.toString().toStdString().c_str() << std::endl;
}
Cube outputCube(options.GetFileName("TO"));

std::unique_ptr<Histogram> hist (outputCube.histogram());

EXPECT_DOUBLE_EQ(hist->Average(), 53214.457630315941);
Expand Down
Loading