Add test for getAs when mid-field not structure

Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
This commit is contained in:
Dave Hickin
2015-07-09 13:22:42 +01:00
parent 8418303ce2
commit d9963b0631

View File

@@ -586,11 +586,18 @@ static void testFieldAccess()
}catch(std::runtime_error& e){
testPass("caught expected exception: %s", e.what());
}
try{
fld->getAs<PVDouble>("hello.world.invalid");
testFail("missing required exception");
}catch(std::runtime_error& e){
testPass("caught expected exception: %s", e.what());
}
}
MAIN(testPVData)
{
testPlan(235);
testPlan(236);
fieldCreate = getFieldCreate();
pvDataCreate = getPVDataCreate();
standardField = getStandardField();