Skip to content
Snippets Groups Projects
Unverified Commit 3f8f8218 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

removing gtest dependency when building with tests off (#5017) (#5020)

* added gtest

* removed gtest dep

* moved lognitude tests

* removed gtest dep

* removed gtest dep
parent 83877512
Branches
Tags 7.1.0_RC1
No related merge requests found
......@@ -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()
......
......@@ -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;
......@@ -133,7 +132,7 @@ 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,
......
......@@ -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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment