Skip to content

Commit

Permalink
Make gtests resillient to error printing (#3820)
Browse files Browse the repository at this point in the history
* correcting swapped line sample prints in output file

* Updating unit test truth data to check Results Group

* I forgot to add the changed test

* Removing period is search phrases

Co-authored-by: Lauren Adoram-Kershner <ladoramkershner@prog28.wr.usgs.gov>
  • Loading branch information
2 people authored and jessemapel committed Apr 2, 2020
1 parent b7408a5 commit ceffac0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions isis/tests/BundleObservationSolveSettingsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ TEST(BundleObservationSolveSettings, GroupConstructorBadOverExisting) {

TEST(BundleObservationSolveSettings, PositionStringToOptionBadValue)
{
QString message = "Unknown bundle instrument position solve option foo.";
QString message = "Unknown bundle instrument position solve option foo";

try {
BundleObservationSolveSettings::stringToInstrumentPositionSolveOption(
Expand All @@ -488,7 +488,7 @@ TEST(BundleObservationSolveSettings, PositionStringToOptionBadValue)

TEST(BundleObservationSolveSettings, PointingStringToOptionBadValue)
{
QString message = "Unknown bundle instrument pointing solve option foo.";
QString message = "Unknown bundle instrument pointing solve option foo";

try {
BundleObservationSolveSettings::stringToInstrumentPointingSolveOption(
Expand Down
4 changes: 2 additions & 2 deletions isis/tests/CamptFunctionalTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ TEST_F(DefaultCube, FunctionalTestCamptFlatFileError) {
FAIL() << "Expected an exception to be thrown";
}
catch(Isis::IException &e) {
EXPECT_TRUE(e.toString().toLatin1().contains("Flat file must have a name."))
EXPECT_TRUE(e.toString().toLatin1().contains("Flat file must have a name"))
<< e.toString().toStdString();
}
catch(...) {
FAIL() << "Expected an IException with message: \"Flat file must have a name.\"";
FAIL() << "Expected an IException with message: \"Flat file must have a name\"";
}
}

Expand Down
4 changes: 2 additions & 2 deletions isis/tests/ColumnTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ TEST(Column, SetWidthError) {
//Should throw an error when Alignment is Decimal and
//SetType is called with String or Integer
TEST_P(TypeError, SetTypeError) {
QString message = "Integer or string type is not sensible if alignment is Decimal.";
QString message = "Integer or string type is not sensible if alignment is Decimal";
Column column;
column.SetAlignment(Column::Decimal);
try {
Expand All @@ -151,7 +151,7 @@ TEST_P(TypeError, SetTypeError) {
//Should throw an error when Type is String or Integer and
//SetAllignment is called with Decimal
TEST_P(TypeError, SetAlignmentError) {
QString message = "Decimal alignment does not make sense for integer or string values.";
QString message = "Decimal alignment does not make sense for integer or string values";
Column column;
column.SetType(GetParam());
try {
Expand Down

0 comments on commit ceffac0

Please sign in to comment.