From ed8ff70947508b14f50b12428c0fa1716f1b1127 Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Wed, 14 Jan 2009 16:38:18 +0800 Subject: [PATCH] BUG: separate test using tinyXML from the rest --- Examples/Projections/CMakeLists.txt | 16 +++++---- .../otbProjectionsExamplesTests.cxx | 5 +-- .../otbProjectionsExamplesTests2.cxx | 35 +++++++++++++++++++ 3 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 Examples/Projections/otbProjectionsExamplesTests2.cxx diff --git a/Examples/Projections/CMakeLists.txt b/Examples/Projections/CMakeLists.txt index 66e5b2a36c..f77ba6798e 100644 --- a/Examples/Projections/CMakeLists.txt +++ b/Examples/Projections/CMakeLists.txt @@ -40,6 +40,7 @@ ENDIF(OTB_DATA_USE_LARGEINPUT) SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary) SET(EXE_TESTS ${CXX_TEST_PATH}/otbProjectionsExamplesTests) +SET(EXE_TESTS2 ${CXX_TEST_PATH}/otbProjectionsExamplesTests2) SET(TOL 0.0) @@ -102,18 +103,21 @@ ADD_TEST(VectorDataProjectionExampleTest ${EXE_TESTS} ENDIF(OTB_DATA_USE_LARGEINPUT) IF( OTB_USE_CURL ) -ADD_TEST(PlaceNameToLonLatExampleTest ${EXE_TESTS} +ADD_TEST(PlaceNameToLonLatExampleTest ${EXE_TESTS2} PlaceNameToLonLatExampleTest Toulouse ) ENDIF( OTB_USE_CURL ) + +ADD_EXECUTABLE(otbProjectionsExamplesTests otbProjectionsExamplesTests.cxx) +TARGET_LINK_LIBRARIES(otbProjectionsExamplesTests OTBCommon OTBIO OTBProjections) + IF( OTB_USE_CURL ) - ADD_EXECUTABLE(otbProjectionsExamplesTests otbProjectionsExamplesTests.cxx) - TARGET_LINK_LIBRARIES(otbProjectionsExamplesTests OTBCommon OTBIO OTBProjections ${CURL_LIBRARY} tinyXML) -ELSE( OTB_USE_CURL ) - ADD_EXECUTABLE(otbProjectionsExamplesTests otbProjectionsExamplesTests.cxx) - TARGET_LINK_LIBRARIES(otbProjectionsExamplesTests OTBCommon OTBIO OTBProjections) + ADD_EXECUTABLE(otbProjectionsExamplesTests2 otbProjectionsExamplesTests2.cxx) + TARGET_LINK_LIBRARIES(otbProjectionsExamplesTests2 OTBCommon OTBIO OTBProjections ${CURL_LIBRARY} tinyXML) ENDIF( OTB_USE_CURL ) + + ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING ) diff --git a/Examples/Projections/otbProjectionsExamplesTests.cxx b/Examples/Projections/otbProjectionsExamplesTests.cxx index 57df328600..74304f2b86 100644 --- a/Examples/Projections/otbProjectionsExamplesTests.cxx +++ b/Examples/Projections/otbProjectionsExamplesTests.cxx @@ -29,7 +29,6 @@ void RegisterTests() REGISTER_TEST(OrthoRectificationExampleTest); REGISTER_TEST(MapProjectionExampleTest); REGISTER_TEST(VectorDataProjectionExampleTest); - REGISTER_TEST(PlaceNameToLonLatExampleTest); } #undef main @@ -44,6 +43,4 @@ void RegisterTests() #define main VectorDataProjectionExampleTest #include "VectorDataProjectionExample.cxx" -#undef main -#define main PlaceNameToLonLatExampleTest -#include "PlaceNameToLonLatExample.cxx" + diff --git a/Examples/Projections/otbProjectionsExamplesTests2.cxx b/Examples/Projections/otbProjectionsExamplesTests2.cxx new file mode 100644 index 0000000000..21d5443389 --- /dev/null +++ b/Examples/Projections/otbProjectionsExamplesTests2.cxx @@ -0,0 +1,35 @@ + +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +// this file defines the otbMultiScaleTest for the test driver +// and all it expects is that you have a function called RegisterTests +#if defined(_MSC_VER) +#pragma warning ( disable : 4786 ) +#endif +#include <iostream> +#include "otbTestMain.h" + +void RegisterTests() +{ + REGISTER_TEST(PlaceNameToLonLatExampleTest); +} + + +#undef main +#define main PlaceNameToLonLatExampleTest +#include "PlaceNameToLonLatExample.cxx" -- GitLab