libCom/test: Added epicsTypesTest, checks type sizes.
This commit is contained in:
@@ -17,6 +17,11 @@ epicsUnitTestTest_SRCS += epicsUnitTestTest.c
|
||||
# Not much point running this on vxWorks or RTEMS...
|
||||
TESTS += epicsUnitTestTest
|
||||
|
||||
TESTPROD_HOST += epicsTypesTest
|
||||
epicsTypesTest_SRCS += epicsTypesTest.cpp
|
||||
testHarness_SRCS += epicsTypesTest.cpp
|
||||
TESTS += epicsTypesTest
|
||||
|
||||
TESTPROD_HOST += epicsCalcTest
|
||||
epicsCalcTest_SRCS += epicsCalcTest.cpp
|
||||
testHarness_SRCS += epicsCalcTest.cpp
|
||||
|
||||
@@ -33,6 +33,7 @@ int epicsThreadOnceTest(void);
|
||||
int epicsThreadPriorityTest(void);
|
||||
int epicsThreadPrivateTest(void);
|
||||
int epicsTimeTest(void);
|
||||
int epicsTypesTest(void);
|
||||
int macLibTest(void);
|
||||
int macEnvExpandTest(void);
|
||||
int ringPointerTest(void);
|
||||
@@ -85,6 +86,8 @@ void epicsRunLibComTests(void)
|
||||
|
||||
runTest(epicsTimeTest);
|
||||
|
||||
runTest(epicsTypesTest);
|
||||
|
||||
runTest(macLibTest);
|
||||
|
||||
runTest(macEnvExpandTest);
|
||||
|
||||
34
src/libCom/test/epicsTypesTest.c
Normal file
34
src/libCom/test/epicsTypesTest.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* epicsTypesTest.c
|
||||
*
|
||||
* Size-check epicsTypes
|
||||
*
|
||||
*/
|
||||
|
||||
#include "epicsUnitTest.h"
|
||||
#include "epicsTypes.h"
|
||||
#include "testMain.h"
|
||||
|
||||
MAIN(epicsTypesTest)
|
||||
{
|
||||
testPlan(8);
|
||||
|
||||
testOk1(sizeof(epicsInt8) == 1);
|
||||
testOk1(sizeof(epicsUInt8) == 1);
|
||||
|
||||
testOk1(sizeof(epicsInt16) == 2);
|
||||
testOk1(sizeof(epicsUInt16) == 2);
|
||||
|
||||
testOk1(sizeof(epicsInt32) == 4);
|
||||
testOk1(sizeof(epicsUInt32) == 4);
|
||||
|
||||
testOk1(sizeof(epicsFloat32) == 4);
|
||||
testOk1(sizeof(epicsFloat64) == 8);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
Reference in New Issue
Block a user