Moved the testfile path to the CMake setup

Edit from the Cmake GUI
This commit is contained in:
Jacob Støren
2015-04-28 09:22:31 +02:00
parent 0560457cd2
commit 1e88b38e69
2 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -26,11 +26,12 @@
//--------------------------------------------------------------------------------------------------
TEST(OdbReaderTest, BasicTests)
{
std::cout << TEST_FILE << std::endl;
std::cout << std::endl;
cvf::ref<RifOdbReader> reader = new RifOdbReader;
cvf::ref<RigGeoMechCaseData> femCase = new RigGeoMechCaseData;
cvf::ref<RigFemPartCollection> 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));