diff --git a/isis/CMakeLists.txt b/isis/CMakeLists.txt index 7894c2608bd0d770b31a112902a0acba8be8b540..fcbe45c023e09f58be567addca1228683b358c1a 100644 --- a/isis/CMakeLists.txt +++ b/isis/CMakeLists.txt @@ -618,6 +618,6 @@ install(PROGRAMS ${CMAKE_SOURCE_DIR}/config/rclone.conf DESTINATION ${CMAKE_INST # the desired post-install commands inside. add_subdirectory(cmake) -if(buildTests) +if(buildTests) add_subdirectory(tests) -endif() \ No newline at end of file +endif() diff --git a/isis/cmake/AddIsisModule.cmake b/isis/cmake/AddIsisModule.cmake index 712aec0fd79e4551e3b98de8f3be1dfec5b35d11..a0f696624b71bcbe403aa4be2a94325d422c7817 100644 --- a/isis/cmake/AddIsisModule.cmake +++ b/isis/cmake/AddIsisModule.cmake @@ -226,10 +226,10 @@ function(add_isis_module name) # - Base module depends on 3rd party libs, other libs also depend on base. # - Only the base module gets both a static and shared library. if(${name} STREQUAL ${CORE_LIB_NAME}) - set(reqLibs "${ALLLIBS};gtest;gmock;${CMAKE_THREAD_LIBS_INIT}") + set(reqLibs "${ALLLIBS};${CMAKE_THREAD_LIBS_INIT}") set(alsoStatic ON) else() - set(reqLibs "${CORE_LIB_NAME};${ALLLIBS};gtest;gmock;${CMAKE_THREAD_LIBS_INIT}") + set(reqLibs "${CORE_LIB_NAME};${ALLLIBS};${CMAKE_THREAD_LIBS_INIT}") set(alsoStatic OFF) endif() diff --git a/isis/src/system/objs/KernelDb/KernelDb.h b/isis/src/system/objs/KernelDb/KernelDb.h index 0f86d2fccfa74d4715624117cb1df0a564355c3a..cecd40b70287d6dd9a822a100562311a91b997d8 100644 --- a/isis/src/system/objs/KernelDb/KernelDb.h +++ b/isis/src/system/objs/KernelDb/KernelDb.h @@ -12,7 +12,6 @@ find files of those names at the top level of this repository. **/ #include <iostream> #include <queue> -#include <gtest/gtest_prod.h> #include <QList> #include <QString> @@ -22,7 +21,7 @@ find files of those names at the top level of this repository. **/ #include "Kernel.h" #include "Pvl.h" -class TestKernelDb_TestKernelsSmithOffset_Test; +class KernelDbFixture_TestKernelsSmithOffset_Test; namespace Isis { class FileName; @@ -107,7 +106,7 @@ namespace Isis { KernelDb(const unsigned int allowedKernelTypes); KernelDb(const QString &dbName, const unsigned int allowedKernelTypes); KernelDb(std::istream &dbStream, const unsigned int allowedKernelTypes); - + // destructor ~KernelDb(); @@ -133,8 +132,8 @@ namespace Isis { static bool matches(const Pvl &lab, PvlGroup &kernelDbGrp, iTime timeToMatch, int cameraVersion); private: - FRIEND_TEST(::TestKernelDb, TestKernelsSmithOffset); - + friend class ::KernelDbFixture_TestKernelsSmithOffset_Test; + void loadKernelDbFiles(PvlGroup &dataDir, QString directory, const Pvl &lab); diff --git a/isis/tests/KernelDbTests.cpp b/isis/tests/KernelDbTests.cpp index bc66e079a6d22c8310d6599edc16e529eec252d5..4671e5d4bc501b9da8af20178c320168438b237b 100644 --- a/isis/tests/KernelDbTests.cpp +++ b/isis/tests/KernelDbTests.cpp @@ -15,7 +15,7 @@ using namespace Isis; -class TestKernelDb : public ::testing::Test { +class KernelDbFixture : public ::testing::Test { protected: Pvl cubeLabel; Pvl dbPvl; @@ -210,7 +210,7 @@ class TestKernelDb : public ::testing::Test { } }; -TEST_F(TestKernelDb, TestKernelsFromDb) { +TEST_F(KernelDbFixture, TestKernelsFromDb) { std::stringstream dbStr; dbStr << dbPvl; KernelDb db(dbStr, Kernel::Predicted|Kernel::Nadir|Kernel::Reconstructed|Kernel::Smithed); @@ -264,7 +264,7 @@ TEST_F(TestKernelDb, TestKernelsFromDb) { EXPECT_PRED_FORMAT2(AssertQStringsEqual, dems[1], "$base/demTest2"); } -TEST_F(TestKernelDb, TwoCks) { +TEST_F(KernelDbFixture, TwoCks) { PvlGroup &instGroup = cubeLabel.findObject("IsisCube").findGroup("Instrument"); instGroup.findKeyword("StopTime") = "2005 JUN 15 12:14:00.000 TDB"; std::stringstream dbStr; @@ -281,7 +281,7 @@ TEST_F(TestKernelDb, TwoCks) { EXPECT_PRED_FORMAT2(AssertQStringsEqual, cks[1], "$base/ckTest2.2"); } -TEST_F(TestKernelDb, SystemKernels) { +TEST_F(KernelDbFixture, SystemKernels) { PvlGroup &instGroup = cubeLabel.findObject("IsisCube").findGroup("Instrument"); instGroup.findKeyword("StartTime") = "2008 JAN 12 00:00:00.0"; instGroup.findKeyword("StopTime") = "2008 JAN 12 00:00:00.0"; @@ -310,7 +310,7 @@ TEST_F(TestKernelDb, SystemKernels) { EXPECT_PRED_FORMAT2(AssertQStringsEqual, spks[0], "$mro/kernels/spk/mro_psp6_ssd_mro110c.bsp"); } -TEST_F(TestKernelDb, SystemCKConfig) { +TEST_F(KernelDbFixture, SystemCKConfig) { PvlGroup &instGroup = cubeLabel.findObject("IsisCube").findGroup("Instrument"); instGroup.findKeyword("StartTime") = "2008 JAN 12 00:00:00.0"; instGroup.findKeyword("StopTime") = "2008 JAN 12 00:00:00.0"; @@ -338,7 +338,7 @@ TEST_F(TestKernelDb, SystemCKConfig) { -TEST_F(TestKernelDb, TestKernelsSmithOffset) { +TEST_F(KernelDbFixture, TestKernelsSmithOffset) { PvlGroup &instGroup = cubeLabel.findObject("IsisCube").findGroup("Instrument"); instGroup.findKeyword("StartTime") = "2002-02-20T22:57:57.253"; instGroup.findKeyword("StopTime") = "2002-02-20T23:00:56.983"; diff --git a/isis/src/base/objs/Longitude/LongitudeTests.cpp b/isis/tests/LongitudeTests.cpp similarity index 100% rename from isis/src/base/objs/Longitude/LongitudeTests.cpp rename to isis/tests/LongitudeTests.cpp