From c6605b5d87c0d25fc5ea560186cbb14027ec3078 Mon Sep 17 00:00:00 2001 From: Brendan Chandler Date: Mon, 9 May 2022 16:02:17 -0500 Subject: [PATCH] Update doxygen annotations in testMain.h There were already some comments here, but they were missing a doxygen \file declaration, so the annotations weren't shown in the doxygen output. Also added some formatting for the code example and definition of MAIN macro. --- modules/libcom/src/misc/testMain.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/libcom/src/misc/testMain.h b/modules/libcom/src/misc/testMain.h index f4512bcbe..dfaa4cadb 100644 --- a/modules/libcom/src/misc/testMain.h +++ b/modules/libcom/src/misc/testMain.h @@ -9,15 +9,20 @@ #ifndef INC_testMain_H #define INC_testMain_H -/* This header defines a convenience macro for use by pure test programs. +/*! + * \file testMain.h + * + * \brief This header defines a platform independent macro for defining a test + * main function, in pure test programs. + * * 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. * - * Use this macro as follows: - * + * \section Example + * \code{.cpp} * #include "testMain.h" * #include "epicsUnitTest.h" * @@ -26,8 +31,14 @@ * testOk(...) * return testDone(); * } + * \endcode */ +/*! + * \def MAIN + * \brief Macro which defines a main function for your test program. Some platforms will name this function main(), others prog(). + * \param prog Name of the test program. + **/ #if defined(__rtems__) #ifdef __cplusplus #define MAIN(prog) extern "C" int prog(void); extern "C" int main() __attribute__((weak, alias(#prog))); extern "C" int prog(void)