 |
OpendTect
6.6
|
Go to the documentation of this file.
32 #ifndef __test_lib_source__
39 static mUsedVar
bool quiet =
true;
43 # define mTestMainFnName testMain
47 # ifndef mMainIsDefined
48 # define mMainIsDefined
49 int main(
int argc,
char** argv)
65 # define mRunSubTest( nm ) \
66 tstStream() << "\n\n\n->" << #nm << " subtest\n\n"; \
67 status = test_main_##nm( argc, argv ); \
71 # define mTestProgInits() \
72 od_init_test_program( argc, argv ); \
73 the_testprog_parser_ = new CommandLineParser; \
74 quiet_ = clParser().hasKey( sKey::Quiet() ); \
75 CommandLineParser& parser mUnusedVar = *the_testprog_parser_; \
78 # define mInitCompositeTestProg(mod) \
80 tstStream() << "** '" << #mod << "' composite test\n\n"; \
83 #define mExitTestProg( var )
85 # define mInitTestProg() mTestProgInits()
86 # define mInitBatchTestProg() \
87 int argc = GetArgC(); char** argv = GetArgV(); \
90 #endif // ifndef __test_lib_source__
121 emsg =
"<no details>";
128 #define mRunStandardTest( test, desc ) \
129 { const bool testres = test; \
130 if ( !handleTestResult(testres,desc) ) return false; }
132 #define mRunStandardTestWithError( test, desc, err ) \
133 { const bool testres = test ; \
134 if ( !handleTestResult(testres,desc,err) ) return false; }
int testMain(int, char **)
static mUsedVar bool quiet
Definition: testprog.h:39
static PtrMan< CommandLineParser > the_testprog_parser_
Definition: testprog.h:57
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:119
static od_ostream & nullStream()
static od_ostream & errStream()
Definition: testprog.h:109
bool handleTestResult(bool isok, const char *desc, const char *emsg=0)
Definition: testprog.h:114
Definition: commandlineparser.h:53
@ TestProgCtxt
Definition: odruncontext.h:25
int main(int argc, char **argv)
Definition: testprog.h:49
static CommandLineParser & clParser()
Definition: testprog.h:59
#define mUnusedVar
Definition: plfdefs.h:210
static bool quiet_
Definition: testprog.h:56
static mUsedVar PtrMan< CommandLineParser > theparser
Definition: testprog.h:40
static od_ostream & logStream()
used by ErrMsg and UsrMsg
void SetRunContext(RunCtxt)
static od_ostream & tstStream(bool err=false)
Definition: testprog.h:93
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
static od_ostream & logStream()
Definition: testprog.h:104
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021