selftestcmdoption.hh File Reference
#include <mia/core/cmdoption.hh>
#include <memory>
Include dependency graph for selftestcmdoption.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CSelftestCallback
 

Macros

#define SELFTEST_CALLBACK(NAME)
 

Macro Definition Documentation

◆ SELFTEST_CALLBACK

#define SELFTEST_CALLBACK (   NAME)
Value:
class NAME: public CSelftestCallback { \
public: \
\
private: \
int do_run(int argc, char **argv)const { \
return ::boost::unit_test::unit_test_main( &init_unit_test, argc, argv); \
} \
}
CSelftestCallback(int argc, char **argv)

This define creates an derived selftest class that runs a BOOST test suite. As usual, the boost tests have to be defined by using BOOST_*_TEST_CASE.

In order to use this test case an instance of this class created with new must be passed to the command line parser by using the add_selftest method.

Parameters
NAMEname of the selftest class.

Definition at line 77 of file selftestcmdoption.hh.