EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
testMain.h File Reference

This header defines a platform independent macro for defining a test main function, in pure test programs. More...

Go to the source code of this file.

Macros

#define MAIN(prog)   int main(int /*argc*/, char * /*argv*/ [] )
 Macro which defines a main function for your test program. Some platforms will name this function main(), others prog(). More...
 

Detailed Description

A pure test program cannot take any arguments since it must be fully automatable. If your program needs to use argv/argc, it may be doing measurements not unit and/or regression testing. On Host architectures these programs needs to be named main and take dummy argc/argv args, but on vxWorks and RTEMS they must be named as the test program.

Example

#include "testMain.h"
#include "epicsUnitTest.h"
MAIN(myProgTest) {
testPlan(...);
testOk(...)
return testDone();
}

Definition in file testMain.h.

Macro Definition Documentation

#define MAIN (   prog)    int main(int /*argc*/, char * /*argv*/ [] )
Parameters
progName of the test program.

Definition at line 56 of file testMain.h.