From d9963b06318b006a71ac2418a29104de383be2c4 Mon Sep 17 00:00:00 2001 From: Dave Hickin Date: Thu, 9 Jul 2015 13:22:42 +0100 Subject: [PATCH] Add test for getAs when mid-field not structure Signed-off-by: Dave Hickin --- testApp/pv/testPVData.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testApp/pv/testPVData.cpp b/testApp/pv/testPVData.cpp index 035e5d5..327a9c2 100644 --- a/testApp/pv/testPVData.cpp +++ b/testApp/pv/testPVData.cpp @@ -586,11 +586,18 @@ static void testFieldAccess() }catch(std::runtime_error& e){ testPass("caught expected exception: %s", e.what()); } + + try{ + fld->getAs("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();