Add tests for 64-bit constant link initializers

This commit is contained in:
Andrew Johnson
2017-05-23 21:20:45 -04:00
parent 80fa616a86
commit 7980d78908
2 changed files with 35 additions and 1 deletions

View File

@@ -210,16 +210,34 @@ static void testEventRecord()
testdbCleanup();
}
void testInt64Inputs(void)
{
testDiag("testInt64Inputs");
startTestIoc("linkInitTest.db");
testdbGetFieldEqual("i1.VAL", DBR_INT64, 1234567890123456789LL);
testdbGetFieldEqual("i2.VAL", DBR_INT64, 1234567890123456789LL);
testdbGetFieldEqual("i3.VAL", DBR_INT64, 1234567890123456789LL);
testdbGetFieldEqual("i4.NORD", DBR_LONG, 1);
testdbGetFieldEqual("i4.VAL", DBR_INT64, 1234567890123456789LL);
testIocShutdownOk();
testdbCleanup();
}
MAIN(linkInitTest)
{
testPlan(72);
testPlan(77);
testLongStringInit();
testCalcInit();
testPrintfStrings();
testArrayInputs();
testEventRecord();
testInt64Inputs();
return testDone();
}

View File

@@ -88,3 +88,19 @@ record(event, "ev1") {
record(event, "ev2") {
field(INP, "count1.EVNT")
}
record(int64in, "i1") {
field(INP, [1234567890123456789,0])
}
record(int64in, "i2") {
field(INP, {const:1234567890123456789})
}
record(int64in, "i3") {
field(INP, 1234567890123456789)
}
record(waveform, "i4") {
field(NELM, 1)
field(FTVL, "INT64")
field(INP, [1234567890123456789,0])
}