add initHookTest
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
30
modules/libcom/test/initHookTest.c
Normal file
30
modules/libcom/test/initHookTest.c
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user