diff --git a/isis/tests/FunctionalTestsGetsn.cpp b/isis/tests/FunctionalTestsGetsn.cpp index 5e73aba573..f3d8201465 100644 --- a/isis/tests/FunctionalTestsGetsn.cpp +++ b/isis/tests/FunctionalTestsGetsn.cpp @@ -22,18 +22,19 @@ static QString APP_XML = FileName("$ISISROOT/bin/xml/getsn.xml").expanded(); // check for all correct outputs TEST_F(DefaultCube, FunctionalTestGetsnAllTrue) { + QString d_APP_XML = FileName("$ISISROOT/bin/xml/getsn.xml").expanded(); QString expectedSN = "Viking1/VISB/33322515"; QString expectedON = "Viking1/VISB/33322515"; - QVector args = { - "FILE=TRUE", + QVector args = { "FILE=TRUE", "SN=TRUE", "OBSERVATION=TRUE"}; - UserInterface options(APP_XML, args); + UserInterface options(d_APP_XML, args); Pvl appLog; + ASSERT_TRUE(1==1); getsn( testCube, options, &appLog ); - PvlGroup results = appLog.findGroup("Results"); - + PvlGroup results = appLog.findGroup("Results"); + EXPECT_PRED_FORMAT2(AssertQStringsEqual, results.findKeyword("Filename"), testCube->fileName()); EXPECT_PRED_FORMAT2(AssertQStringsEqual, results.findKeyword("SerialNumber"), expectedSN); EXPECT_PRED_FORMAT2(AssertQStringsEqual, results.findKeyword("ObservationNumber"), expectedON); @@ -66,9 +67,9 @@ TEST_F(DefaultCube, FunctionalTestGetsnDefaultTrue) { Pvl appLog; Pvl *testLabel = testCube->label(); testLabel->findObject( "IsisCube" ).deleteGroup( "Instrument" ); - + getsn( testCube, options, &appLog ); - PvlGroup results = appLog.findGroup("Results"); + PvlGroup results = appLog.findGroup("Results"); EXPECT_PRED_FORMAT2(AssertQStringsEqual, fileName , results.findKeyword("SerialNumber")); } @@ -83,9 +84,9 @@ TEST_F(DefaultCube, FunctionalTestGetsnDefaultFalse) { Pvl appLog; Pvl *testLabel = testCube->label(); testLabel->findObject( "IsisCube" ).deleteGroup( "Instrument" ); - + getsn( testCube, options, &appLog ); - PvlGroup results = appLog.findGroup("Results"); + PvlGroup results = appLog.findGroup("Results"); EXPECT_PRED_FORMAT2(AssertQStringsEqual, fileName , results.findKeyword("SerialNumber")); } @@ -114,7 +115,7 @@ TEST_F(DefaultCube, FunctionalTestGetsnFlat) { // Test that append true appends to file TEST_F(DefaultCube, FunctionalTestGetsnAppend) { QFile flatFile(tempDir.path()+"testOut.txt"); - QVector args = { + QVector args = { "FORMAT=FLAT", "TO="+flatFile.fileName(), "APPEND=TRUE"}; @@ -133,7 +134,7 @@ TEST_F(DefaultCube, FunctionalTestGetsnAppend) { // Test that append false overwrites file TEST_F(DefaultCube, FunctionalTestGetsnOverwrite) { QFile flatFile(tempDir.path()+"testOut.txt"); - QVector args = { + QVector args = { "FORMAT=FLAT", "TO="+flatFile.fileName(), "APPEND=FALSE"};