Skip to content
Snippets Groups Projects
Commit 058191c9 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

TEST:add test for otbWrapperApplication

parent 29bf0a99
No related branches found
No related tags found
No related merge requests found
FILE(GLOB srcs "*.cxx")
ADD_LIBRARY(otbWrapperCore ${srcs})
TARGET_LINK_LIBRARIES(otbWrapperCore OTBCommon OTBIO)
ADD_LIBRARY(OTBWrapperCore ${srcs})
TARGET_LINK_LIBRARIES(OTBWrapperCore OTBCommon OTBIO)
......@@ -23,15 +23,11 @@ namespace otb
namespace Wrapper
{
Application::Application()
{
//m_ParameterList = ParameterList::New();
}
Application::Application(): m_Name(""), m_Description("")
{}
Application::~Application()
{
}
{}
}
}
......
......@@ -19,8 +19,10 @@
#define __otbWrapperApplication_h
#include <string>
#include "otbMacro.h"
#include "itkObject.h"
#include "otbWrapperParameterList.h"
#include "itkObjectFactory.h"
namespace otb
{
......@@ -35,57 +37,53 @@ namespace Wrapper
class ITK_EXPORT Application : public itk::Object
{
public:
/** Standard class typedefs. */
typedef Application Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Standard class typedefs. */
typedef Application Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Defining ::New() static method */
itkNewMacro(Self);
/** Defining ::New() static method */
itkNewMacro(Self);
/** RTTI support */
itkTypeMacro(Application,itk::Object);
/** RTTI support */
itkTypeMacro(Application,itk::Object);
std::string GetName()
{
return m_Name;
}
/** Set the parameter name */
itkSetStringMacro(Name);
std::string GetDescription()
{
return m_Description;
}
/** Get the parameter name */
itkGetStringMacro(Name);
ParameterList* GetParameterList();
/** Set the parameter description */
itkSetStringMacro(Description);
virtual int Execute() { return 0;}
/** Get the parameter description */
itkGetStringMacro(Description);
protected:
Application();
virtual ~Application();
ParameterList* GetParameterList()
{
return m_ParameterList;
}
private:
Application(const Application &); //purposely not implemented
void operator =(const Application&); //purposely not implemented
virtual int Execute() {return 0;}
void SetName(std::string s)
{
m_Name = s;
}
protected:
/** Constructor */
Application();
virtual ~Application();
void SetDescription(std::string s)
{
m_Description = s;
}
private:
Application(const Application &); //purposely not implemented
void operator =(const Application&); //purposely not implemented
std::string m_Name;
std::string m_Description;
ParameterList::Pointer m_ParameterList;
};
std::string m_Name;
std::string m_Description;
ParameterList::Pointer m_ParameterList;
}; //end class
}
}
} // end namespace Wrapper
} //end namespace otb
#endif // __otbWrapperApplicationOptions_h_
#endif // __otbWrapperApplication_h_
......@@ -37,6 +37,12 @@ ADD_TEST(owTvNumericalParameter ${OTB_WRAPPER_TESTS}
"mykey"
"my description"
)
# Application class test
ADD_TEST(owTuApplication ${OTB_WRAPPER_TESTS}
otbWrapperApplicationNew
)
# ----------------Source files CXX -----------------------------------
SET(Wrapper_SRCS
......@@ -44,10 +50,10 @@ otbWrapperTests.cxx
otbWrapperParameterTest.cxx
otbWrapperNumericalParameterTest.cxx
otbWrapperEmptyParameterTest.cxx
#otbWrapperApplicationTest.cxx
otbWrapperApplicationTest.cxx
otbWrapperParameterListTest.cxx
)
ADD_EXECUTABLE(otbWrapperTests ${Wrapper_SRCS})
TARGET_LINK_LIBRARIES(otbWrapperTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting)
TARGET_LINK_LIBRARIES(otbWrapperTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting OTBWrapperCore)
......@@ -31,6 +31,6 @@ void RegisterTests()
REGISTER_TEST(otbWrapperNumericalParameterNew);
REGISTER_TEST(otbWrapperNumericalParameterTest1);
REGISTER_TEST(otbWrapperEmptyParameterNew);
//REGISTER_TEST(otbWrapperApplicationNew);
REGISTER_TEST(otbWrapperApplicationNew);
REGISTER_TEST(otbWrapperParameterListNew);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment