From 1e88b38e69b9077fa450b30f9908ab8087a53520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Tue, 28 Apr 2015 09:22:31 +0200 Subject: [PATCH] Moved the testfile path to the CMake setup Edit from the Cmake GUI --- ApplicationCode/GeoMech/OdbReader_UnitTests/CMakeLists.txt | 4 +++- .../GeoMech/OdbReader_UnitTests/RifOdbReader-Test.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/GeoMech/OdbReader_UnitTests/CMakeLists.txt b/ApplicationCode/GeoMech/OdbReader_UnitTests/CMakeLists.txt index f867479761..d9ed125e8f 100644 --- a/ApplicationCode/GeoMech/OdbReader_UnitTests/CMakeLists.txt +++ b/ApplicationCode/GeoMech/OdbReader_UnitTests/CMakeLists.txt @@ -3,7 +3,8 @@ cmake_minimum_required (VERSION 2.8) project ( OdbReader_UnitTests ) set(RI_VIZ_FWK_ROOT ../../../Fwk/main/VizFwk CACHE PATH "Path to VizFwk") -set(RI_GTEST_ROOT ../../../ThirdParty CACHE PATH "Path to forlder containing gtest folder") +set(RI_GTEST_ROOT ../../../ThirdParty CACHE PATH "Path to folder containing gtest folder") +set(RI_TEST_FILE "" CACHE PATH "Path to test file") include(${RI_VIZ_FWK_ROOT}/CMake/Utils/ceeDetermineCompilerFlags.cmake) @@ -11,6 +12,7 @@ add_subdirectory(${RI_VIZ_FWK_ROOT}/LibCore buildVizFwk) add_subdirectory(../GeoMechDataModel buildGeoMechDataModel) add_subdirectory(../OdbReader buildOdbReader) +add_definitions( -DTEST_FILE="${RI_TEST_FILE}") include_directories(${RI_VIZ_FWK_ROOT}/LibCore) include_directories(../GeoMechDataModel) diff --git a/ApplicationCode/GeoMech/OdbReader_UnitTests/RifOdbReader-Test.cpp b/ApplicationCode/GeoMech/OdbReader_UnitTests/RifOdbReader-Test.cpp index c859c9e34a..d2ddc8c6d2 100644 --- a/ApplicationCode/GeoMech/OdbReader_UnitTests/RifOdbReader-Test.cpp +++ b/ApplicationCode/GeoMech/OdbReader_UnitTests/RifOdbReader-Test.cpp @@ -26,11 +26,12 @@ //-------------------------------------------------------------------------------------------------- TEST(OdbReaderTest, BasicTests) { + std::cout << TEST_FILE << std::endl; + std::cout << std::endl; cvf::ref reader = new RifOdbReader; cvf::ref femCase = new RigGeoMechCaseData; cvf::ref femData = femCase->femParts(); - reader->readFemParts("C:\\pfRoot\\jjsOnJacobpcCsdep\\User\\Sigurd\\OdbApiExperiments\\viewer_tutorial.odb", femData.p()); - + reader->readFemParts(TEST_FILE, femData.p()); EXPECT_EQ(1, femData->partCount()); EXPECT_EQ(149, femData->part(0)->elementCount()); EXPECT_EQ(CAX4, femData->part(0)->elementType(0));