X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tests%2Ftools%2FCMakeLists.txt;h=3d5e87f63900a6220e18e2f8eaa380113fada321;hb=14ac2ff5d6db3f0adfab9e2fc82e3e4a54c0494b;hp=ad57d590876a8ac5f1d4b6a7eeba817c35303a26;hpb=8eaf0a647fec2440abf6064d78d3eab735aa90c6;p=clitk.git diff --git a/tests/tools/CMakeLists.txt b/tests/tools/CMakeLists.txt index ad57d59..3d5e87f 100644 --- a/tests/tools/CMakeLists.txt +++ b/tests/tools/CMakeLists.txt @@ -4,11 +4,47 @@ include_directories( ${GTEST_DIR}/include ) -FILE(GLOB srcs *.cxx) -ADD_EXECUTABLE(toolsTest ${srcs}) -ADD_DEFINITIONS(-DTOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\") -target_link_libraries(toolsTest vvLib ${vvExternalLibs} gtest) - -# Add all tests found in the source code, calling the executable to run them -add_google_tests ( ${EXECUTABLE_OUTPUT_PATH}/toolsTest ${srcs}) -SET(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING) \ No newline at end of file +SET (CUSTOM_TEST_SRC + clitkImageInfoTest.cxx + vvMainTest.cxx +) + +SET(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING) +ADD_DEFINITIONS(-DCLITK_TEST_TOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\") +SET (srcs + toolTestRunner.cxx +) + +ADD_EXECUTABLE(toolTestRunner ${srcs}) +TARGET_LINK_LIBRARIES(toolTestRunner vvLib ${vvExternalLibs}) +SET(exe ${EXECUTABLE_OUTPUT_PATH}/toolTestRunner) +SET(p ${CLITK_TEST_DATA_PATH}) +SET(tmpFile "feve51zd") +#========================================================= +# clitkImageInfo +ADD_TEST(clitkImageInfo_4d ${exe} clitkImageInfo ${p}Deformation4D.mhd ${p}Deformation4D_ref.info) +ADD_TEST(clitkImageInfo_3d ${exe} clitkImageInfo ${p}Lung3D.mhd ${p}Lung3D_ref.info) +#========================================================= +# clitkGetSpacing +ADD_TEST(clitkGetSpacing_4d ${exe} clitkGetSpacing -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.spacing) +ADD_TEST(clitkGetSpacing_3d ${exe} clitkGetSpacing -i ${p}Lung3D.mhd ${p}Lung3D_ref.spacing) +#========================================================= +# clitkGetOrigin +ADD_TEST(clitkGetOrigin_4d ${exe} clitkGetOrigin -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.origin) +ADD_TEST(clitkGetOrigin_3d ${exe} clitkGetOrigin -i ${p}Lung3D.mhd ${p}Lung3D_ref.origin) +#========================================================= +# clitkGetSize +ADD_TEST(clitkGetSize_4d ${exe} clitkGetSize -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.size) +ADD_TEST(clitkGetSize_3d ${exe} clitkGetSize -i ${p}Lung3D.mhd ${p}Lung3D_ref.size) +#========================================================= +# clitkGetDirection +ADD_TEST(clitkGetDirection_4d ${exe} clitkGetDirection -i ${p}Deformation4D.mhd ${p}Deformation4D_ref.direction) +ADD_TEST(clitkGetDirection_3d ${exe} clitkGetDirection -i ${p}Lung3D.mhd ${p}Lung3D_ref.direction) +#========================================================= +# clitkBinarize +ADD_TEST(clitkBinarizeBGl0.1356_4d ${exe} clitkBinarizeImage -i ${p}Deformation4D.mhd --mode BG -l 0.1356 -o Deformation4D_ref.binarizeBGl0.1356.mhd ${p}Deformation4D_ref.binarizeBGl0.1356) +ADD_TEST(clitkBinarizeFGl0.1556_3d ${exe} clitkBinarizeImage -i ${p}Lung3D.mhd --mode FG -l 0.1556 -o Lung3D_ref.binarizeFGl0.1556.mhd ${p}Lung3D_ref.binarizeFGl0.1556) + +UNSET(tmpFile) +UNSET(exe) +UNSET(p) \ No newline at end of file