add initHookTest

This commit is contained in:
Michael Davidsaver
2021-06-30 10:39:58 -07:00
parent 8e7d3e9216
commit 710c50b5ed
3 changed files with 37 additions and 0 deletions

View File

@@ -144,6 +144,11 @@ epicsThreadPoolTest_SRCS += epicsThreadPoolTest.c
testHarness_SRCS += epicsThreadPoolTest.c
TESTS += epicsThreadPoolTest
TESTPROD_HOST += initHookTest
initHookTest_SRCS += initHookTest.c
testHarness_SRCS += initHookTest.c
TESTS += initHookTest
TESTPROD_HOST += epicsExitTest
epicsExitTest_SRCS += epicsExitTest.c
testHarness_SRCS += epicsExitTest.c

View File

@@ -50,6 +50,7 @@ int epicsTimeZoneTest(void);
#endif
int epicsTypesTest(void);
int epicsInlineTest(void);
int initHookTest(void);
int ipAddrToAsciiTest(void);
int macDefExpandTest(void);
int macLibTest(void);
@@ -105,6 +106,7 @@ void epicsRunLibComTests(void)
runTest(epicsTimeZoneTest);
#endif
runTest(epicsTypesTest);
runTest(initHookTest);
runTest(ipAddrToAsciiTest);
runTest(macDefExpandTest);
runTest(macLibTest);

View File

@@ -0,0 +1,30 @@
/*************************************************************************\
* Copyright (c) 2021 Michael Davidsaver
* SPDX-License-Identifier: EPICS
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <testMain.h>
#include <epicsUnitTest.h>
#include <initHooks.h>
static
void testHookNames(void)
{
const char* s;
s = initHookName(initHookAtEnd);
testOk(strcmp(s, "initHookAtEnd")==0, "'%s' == 'initHookAtEnd'", s);
}
MAIN(initHookTest)
{
testPlan(1);
testHookNames();
return testDone();
}