From 269366da4602791603db8d9a1ad7e2246c057eb4 Mon Sep 17 00:00:00 2001 From: Martin Killenberg <martin.killenberg@desy.de> Date: Thu, 14 Sep 2017 10:09:01 +0200 Subject: [PATCH] fixed error handling to actually test dspectrum creation --- tests/src/testDoocsPVFactory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/src/testDoocsPVFactory.cpp b/tests/src/testDoocsPVFactory.cpp index 13ec209..4ce8290 100644 --- a/tests/src/testDoocsPVFactory.cpp +++ b/tests/src/testDoocsPVFactory.cpp @@ -45,6 +45,10 @@ public: typename boost::shared_ptr<D_fct> createDoocsScalar(typename ProcessVariable::SharedPtr & processVariable){ return DoocsPVFactory::createDoocsScalar<T, DOOCS_T>(processVariable); } + template<class T> + typename boost::shared_ptr<D_fct> createDoocsSpectrum(typename ProcessVariable::SharedPtr & processVariable){ + return DoocsPVFactory::createDoocsSpectrum<T>(processVariable); + } }; template<class T, class DOOCS_T> @@ -227,7 +231,7 @@ BOOST_AUTO_TEST_CASE( testErrorHandling ){ // now the same with arrays ProcessVariable::SharedPtr processArray = csManager->getProcessArray<int64_t>("A/toDeviceArray"); - BOOST_CHECK_THROW( ( testableFactory.createDoocsScalar<int32_t, D_int>(processArray) ), + BOOST_CHECK_THROW( ( testableFactory.createDoocsSpectrum<int32_t>(processArray) ), std::invalid_argument ); // finally we check that the create method catches the not-supported type. -- GitLab