Commit 53610ee8 authored by Otmane Lahlou's avatar Otmane Lahlou

TEST: add ApplicationsBrowser test

parent 7fafc49c
......@@ -19,13 +19,26 @@ include_directories(
${Monteverdi2_BINARY_DIR}/Code/Common
)
# add source files
set(Common_SRCS
mvdApplicationsToolBoxTest.cxx
mvdApplicationsBrowserTest.cxx
)
#-------------- Monteverdi Common Tests ---------------------------------
add_test(apTvMonteverdi2ApplicationsToolBox ${Common_TESTS} mvdApplicationsToolBoxTest)
# Applications toolBox test
add_test(apTvMonteverdi2ApplicationsToolBox ${Common_TESTS} mvdApplicationsToolBoxTest)
set(Common_SRCS
mvdApplicationsToolBoxTest.cxx
)
# Applications browser test
add_test(apTvMonteverdi2ApplicationsBrowser ${Common_TESTS}
mvdApplicationsBrowserTest
${OTB_DIR}/bin
)
add_executable(mvdCommonTests mvdCommonTests.cxx ${Common_SRCS})
target_link_libraries(mvdCommonTests Monteverdi2_Common OTBTesting)
/*=========================================================================
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.
=========================================================================*/
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
// Monteverdi includes (sorted by alphabetic order)
#include "mvdApplicationsBrowser.h"
int mvdApplicationsBrowserTest(int argc, char* argv[])
{
//
// instanciate applications browser
mvd::ApplicationsBrowser * browser = new mvd::ApplicationsBrowser();
//
// is search path set
if (argc > 1)
{
browser->SetAutoLoadPath(argv[1]);
}
//
// print available applications or exit with failure
if ( browser->GetAvailableApplications().size() == 0 )
return EXIT_FAILURE;
// return ok
return EXIT_SUCCESS;
}
......@@ -27,4 +27,5 @@
void RegisterTests()
{
REGISTER_TEST(mvdApplicationsToolBoxTest);
REGISTER_TEST(mvdApplicationsBrowserTest);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment