Unverified Commit f7c4b88b authored by Lauren Adoram-Kershner's avatar Lauren Adoram-Kershner Committed by GitHub
Browse files

Make gtests resillient to error printing (#3820)



* 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: default avatarLauren Adoram-Kershner <ladoramkershner@prog28.wr.usgs.gov>
parent 7498b22b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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(
@@ -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(
+2 −2
Original line number Diff line number Diff line
@@ -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\"";
  }
}

+2 −2
Original line number Diff line number Diff line
@@ -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 {
@@ -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 {