Value::copyIn() add Array -> Array w/ implied alloc+convert

This commit is contained in:
Michael Davidsaver
2023-02-19 10:01:25 -08:00
parent 4029f5ac3c
commit af3c870b7a
2 changed files with 16 additions and 1 deletions
+12
View File
@@ -70,6 +70,17 @@ void testAssign()
testEq(val["alarm.severity"].as<epicsAlarmSeverity>(), INVALID_ALARM);
}
void testAssignArray()
{
testDiag("%s", __func__);
auto val = TypeDef(TypeCode::Int32A).create();
val = shared_array<const int32_t>({1, 2, 3});
val = shared_array<const int16_t>({4, 5, 6}); // with implied conversion
}
void testAssignUnion()
{
testDiag("%s", __func__);
@@ -438,6 +449,7 @@ MAIN(testdata)
testSetup();
testTraverse();
testAssign();
testAssignArray();
testAssignUnion();
testAssignAny();
testName();