Commit 0168a08b authored by Amy Stamile's avatar Amy Stamile Committed by Jesse Mapel
Browse files

Fixed googletest to use TestPreference file.

parent f471eb3c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -608,7 +608,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(
@@ -625,7 +625,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
@@ -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 {
+2 −2
Original line number Diff line number Diff line
@@ -59,11 +59,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.\"";
  }
}

+5 −0
Original line number Diff line number Diff line
#include <gtest/gtest.h>
#include "Preference.h"

using namespace Isis;

int main(int argc, char **argv) {
   Isis::Preference::Preferences(true);

   ::testing::InitGoogleTest(&argc, argv);
   return RUN_ALL_TESTS();
}