From 8303c36f14f766ed5be040e9404978a7790abc05 Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Fri, 5 Dec 2008 15:56:18 +0800 Subject: [PATCH] TEST: adding example test --- Examples/IO/CMakeLists.txt | 16 +++++++++++++++- Examples/IO/LidarToImageExample.cxx | 4 ++-- Examples/IO/otbIOExamplesTests.cxx | 4 ++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Examples/IO/CMakeLists.txt b/Examples/IO/CMakeLists.txt index 818addbdee..ffd0465a66 100644 --- a/Examples/IO/CMakeLists.txt +++ b/Examples/IO/CMakeLists.txt @@ -109,6 +109,7 @@ IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING ) SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/IO) +SET(DATA ${OTB_DATA_ROOT}/Input) SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data) SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary) @@ -147,7 +148,20 @@ ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS} -0.002 ${INPUTDATA}/DEM_srtm ) - + +IF(ITK_USE_REVIEW) +ADD_TEST(LidarToImageExampleTest ${EXE_TESTS} +--compare-image ${TOL} ${BASELINE}/lidar-image-4.hdr + ${TEMP}/lidar-image-4.hdr + LidarToImageExampleTest + ${DATA}/TO_core_last_zoom.las + ${TEMP}/lidar-image-4.hdr + ${TEMP}/lidar-image-4.png + 1.0 + 5 + 4 + ) +ENDIF(ITK_USE_REVIEW) ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx) TARGET_LINK_LIBRARIES(otbIOExamplesTests otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES}) diff --git a/Examples/IO/LidarToImageExample.cxx b/Examples/IO/LidarToImageExample.cxx index 497e4ce2ca..d8af6416fd 100644 --- a/Examples/IO/LidarToImageExample.cxx +++ b/Examples/IO/LidarToImageExample.cxx @@ -22,13 +22,13 @@ // Software Guide : BeginCommandLineArgs // INPUTS: {TO_core_last_zoom.las} // OUTPUTS: {lidar-image-4.hdr}, {lidar-image-4.png} -// 10.0 5 4 +// 1.0 5 4 // Software Guide : EndCommandLineArgs // Software Guide : BeginCommandLineArgs // INPUTS: {TO_core_last_zoom.las} // OUTPUTS: {lidar-image-8.hdr}, {lidar-image-8.png} -// 10.0 5 8 +// 1.0 5 8 // Software Guide : EndCommandLineArgs diff --git a/Examples/IO/otbIOExamplesTests.cxx b/Examples/IO/otbIOExamplesTests.cxx index d46a3e5bda..5a2ded9aad 100644 --- a/Examples/IO/otbIOExamplesTests.cxx +++ b/Examples/IO/otbIOExamplesTests.cxx @@ -27,6 +27,7 @@ void RegisterTests() { REGISTER_TEST(ExtractROITest); REGISTER_TEST(DEMToImageGeneratorTest); +REGISTER_TEST(LidarToImageExampleTest); } #undef main @@ -37,3 +38,6 @@ REGISTER_TEST(DEMToImageGeneratorTest); #define main DEMToImageGeneratorTest #include "DEMToImageGenerator.cxx" +#undef main +#define main LidarToImageExampleTest +#include "LidarToImageExample.cxx" -- GitLab