ioc/db: dbUnitTest helps support int64

This commit is contained in:
Michael Davidsaver
2017-05-03 18:39:43 -04:00
parent 1b16c7130b
commit 5e0dc5d1c9
3 changed files with 12 additions and 0 deletions

View File

@@ -130,6 +130,8 @@ long testdbVPutField(const char* pv, short dbrType, va_list ap)
OP(DBR_USHORT, int, uInt16);
OP(DBR_LONG, int, int32);
OP(DBR_ULONG, unsigned int, uInt32);
OP(DBR_INT64, long long, int64);
OP(DBR_UINT64, unsigned long long, uInt64);
OP(DBR_FLOAT, double, float32);
OP(DBR_DOUBLE, double, float64);
OP(DBR_ENUM, int, enum16);
@@ -218,10 +220,14 @@ void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap)
OP(DBR_USHORT, int, uInt16, "%d");
OP(DBR_LONG, int, int32, "%d");
OP(DBR_ULONG, unsigned int, uInt32, "%u");
OP(DBR_INT64, long long, int64, "%lld");
OP(DBR_UINT64, unsigned long long, uInt64, "%llu");
OP(DBR_FLOAT, double, float32, "%e");
OP(DBR_DOUBLE, double, float64, "%e");
OP(DBR_ENUM, int, enum16, "%d");
#undef OP
default:
testFail("dbGetField(\"%s\", %d) -> unsupported dbf", pv, dbrType);
}
}
@@ -278,6 +284,8 @@ void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsign
OP(DBR_USHORT, unsigned short, "%u");
OP(DBR_LONG, int, "%d");
OP(DBR_ULONG, unsigned int, "%u");
OP(DBR_INT64, long long, "%lld");
OP(DBR_UINT64, unsigned long long, "%llu");
OP(DBR_FLOAT, float, "%e");
OP(DBR_DOUBLE, double, "%e");
OP(DBR_ENUM, int, "%d");

View File

@@ -38,6 +38,8 @@ epicsShareFunc void testdbCleanup(void);
*
* int for DBR_UCHAR, DBR_CHAR, DBR_USHORT, DBR_SHORT, DBR_LONG
* unsigned int for DBR_ULONG
* long long for DBF_INT64
* unsigned long long for DBF_UINT64
* double for DBR_FLOAT and DBR_DOUBLE
* const char* for DBR_STRING
*

View File

@@ -82,6 +82,8 @@ typedef union epics_any {
epicsEnum16 enum16;
epicsInt32 int32;
epicsUInt32 uInt32;
epicsInt64 int64;
epicsUInt64 uInt64;
epicsFloat32 float32;
epicsFloat64 float64;
epicsString string;