From e03b6495e80fe611bf42466313897a71e5dfd36a Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 3 Dec 2015 10:57:10 +0100 Subject: [PATCH] (#687) Moved ReservoirDataModelUnitTests into ApplicationCode/UnitTests --- .../CMakeLists.txt | 118 ------------------ .../ReservoirDataModel_UnitTests/main.cpp | 46 ------- .../RigActiveCellInfo-Test.cpp | 0 .../RigReservoir-Test.cpp | 0 .../RigStatisticsMath-Test.cpp | 0 .../cvfGeometryTools-Test.cpp | 0 6 files changed, 164 deletions(-) delete mode 100644 ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/CMakeLists.txt delete mode 100644 ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/main.cpp rename ApplicationCode/{ReservoirDataModel/ReservoirDataModel_UnitTests => UnitTests}/RigActiveCellInfo-Test.cpp (100%) rename ApplicationCode/{ReservoirDataModel/ReservoirDataModel_UnitTests => UnitTests}/RigReservoir-Test.cpp (100%) rename ApplicationCode/{ReservoirDataModel/ReservoirDataModel_UnitTests => UnitTests}/RigStatisticsMath-Test.cpp (100%) rename ApplicationCode/{ReservoirDataModel/ReservoirDataModel_UnitTests => UnitTests}/cvfGeometryTools-Test.cpp (100%) diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/CMakeLists.txt b/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/CMakeLists.txt deleted file mode 100644 index 80115859bf..0000000000 --- a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ -cmake_minimum_required (VERSION 2.8) - -SET (ProjectName RigReservoirDataModel_UnitTests) -project ( ${ProjectName} ) - -# Qt -find_package (Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED) -include (${QT_USE_FILE}) - -include_directories( - ${LibCore_SOURCE_DIR} - ${LibGeometry_SOURCE_DIR} - ${LibRender_SOURCE_DIR} - ${LibViewing_SOURCE_DIR} - - ${ResInsight_SOURCE_DIR}/ApplicationCode - ${ResInsight_SOURCE_DIR}/ApplicationCode/ResultStatisticsCache - ${ResInsight_SOURCE_DIR}/ApplicationCode/ReservoirDataModel - ${ResInsight_SOURCE_DIR}/ApplicationCode/FileInterface - ${ResInsight_SOURCE_DIR}/ApplicationCode/ProjectDataModel - ${ResInsight_SOURCE_DIR}/ThirdParty - ${ResInsight_SOURCE_DIR}/ThirdParty/NRLib/nrlib/well - - #${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafProjectDataModel - - ${cafProjectDataModel_SOURCE_DIR} - ${cafPdmCore_SOURCE_DIR} - - ${ResInsight_SOURCE_DIR}/Fwk/AppFwk/CommonCode - - #Remove when RigStatistics is out - #${ResInsight_SOURCE_DIR}/ApplicationCode/ModelVisualization -) - -# Populate the filenames into variable lists -include ("${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists_files.cmake") - - -set( UNIT_TEST_CPP_SOURCES - - ${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp - - main.cpp - RigActiveCellInfo-Test.cpp - RigReservoir-Test.cpp - RigStatisticsMath-Test.cpp - cvfGeometryTools-Test.cpp -) - - -############################################################################# -# Adds folders for Visual Studio solution explorer (and for Xcode explorer) -############################################################################# -source_group( "UnitTests" FILES ${UNIT_TEST_CPP_SOURCES} ) - - - -set( LINK_LIBRARIES - CommonCode - - ResultStatisticsCache - - LibViewing - LibRender - LibGeometry - LibCore - - ecl - ecl_well - ert_util - - NRLib - - ${QT_LIBRARIES} -) - - -add_executable( ${ProjectName} - ${CODE_SOURCE_FILES} - ${UNIT_TEST_CPP_SOURCES} - ${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists_files.cmake - - ${ResInsight_SOURCE_DIR}/ThirdParty/gtest/gtest-all.cc -) - - - -IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set ( LINUX_LINK_LIBRARIES - pthread - ) - - # Linux specific code - set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat") - set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -D_DEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ") - -ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_CXX_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=1") -ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - - -target_link_libraries( ${ProjectName} ${LINK_LIBRARIES} ${LINUX_LINK_LIBRARIES}) - - -# Copy Qt Dlls -if (MSVC) - set (QTLIBLIST QtCore QtGui QtOpenGl) - foreach (qtlib ${QTLIBLIST}) - - # Debug - execute_process(COMMAND cmake -E copy_if_different ${QT_BINARY_DIR}/${qtlib}d4.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug/${qtlib}d4.dll) - - # Release - execute_process(COMMAND cmake -E copy_if_different ${QT_BINARY_DIR}/${qtlib}4.dll ${CMAKE_CURRENT_BINARY_DIR}/Release/${qtlib}4.dll) - endforeach( qtlib ) -endif(MSVC) diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/main.cpp b/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/main.cpp deleted file mode 100644 index 543a31bbf5..0000000000 --- a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/main.cpp +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS -// -// ResInsight is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - - -#include "cvfBase.h" - -#include "gtest/gtest.h" -#include - -#include "cvfTrace.h" - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -int main(int argc, char **argv) -{ - //printf("Running main() from LibCore_UnitTests.cpp\n"); - //printf("LibCore version: %s.%s-%s (%s) \n\n", CVF_MAJOR_VERSION, CVF_MINOR_VERSION, CVF_BUILD_NUMBER, CVF_SPECIAL_BUILD); - - cvf::Assert::setReportMode(cvf::Assert::CONSOLE); - - testing::InitGoogleTest(&argc, argv); - - int result = RUN_ALL_TESTS(); - - std::cout << "Please press to close the window."; - std::cin.get(); - - return result; -} diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp b/ApplicationCode/UnitTests/RigActiveCellInfo-Test.cpp similarity index 100% rename from ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigActiveCellInfo-Test.cpp rename to ApplicationCode/UnitTests/RigActiveCellInfo-Test.cpp diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigReservoir-Test.cpp b/ApplicationCode/UnitTests/RigReservoir-Test.cpp similarity index 100% rename from ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigReservoir-Test.cpp rename to ApplicationCode/UnitTests/RigReservoir-Test.cpp diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigStatisticsMath-Test.cpp b/ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp similarity index 100% rename from ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/RigStatisticsMath-Test.cpp rename to ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp diff --git a/ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/cvfGeometryTools-Test.cpp b/ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp similarity index 100% rename from ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests/cvfGeometryTools-Test.cpp rename to ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp