From 78895d0a540d407c13698e0bc5b8500011555044 Mon Sep 17 00:00:00 2001
From: Martin Hierholzer <martin.hierholzer@desy.de>
Date: Tue, 18 Jul 2017 09:34:17 +0200
Subject: [PATCH] fixed a remaining NULL pointer passed instead of a pointer to
 EqFct

---
 tests/src/testDoocsPVFactory.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/src/testDoocsPVFactory.cpp b/tests/src/testDoocsPVFactory.cpp
index 6b07125..05f55f5 100644
--- a/tests/src/testDoocsPVFactory.cpp
+++ b/tests/src/testDoocsPVFactory.cpp
@@ -28,6 +28,8 @@ typedef boost::mpl::list<int32_t, uint32_t,
 			 int8_t, uint8_t,
 			 float, double> simple_test_types;
 
+EqFct myEqFct("MY_EQ_FCT");
+
 // class which exposes the protected member functions for testing
 class TestableDoocsPVFactory: public DoocsPVFactory{
 public:
@@ -83,7 +85,6 @@ BOOST_AUTO_TEST_CASE( testCreateScalars ) {
     new ControlSystemSynchronizationUtility(csManager));
 
   
-  EqFct myEqFct("MY_EQ_FCT");
   DoocsPVFactory factory(&myEqFct, syncUtil);
 
   // We insert check points with integers so we know where the algorithm kicks out in case of an error.
@@ -134,7 +135,6 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( testCreateArray, T, simple_test_types ){
   shared_ptr<ControlSystemSynchronizationUtility> syncUtil(
     new ControlSystemSynchronizationUtility(csManager));
 
-  EqFct myEqFct("MY_EQ_FCT");
   DoocsPVFactory factory(&myEqFct, syncUtil);
 
   // have the variable created and check that it is the right type
@@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE( testErrorHandling ){
 
   shared_ptr<ControlSystemSynchronizationUtility> syncUtil(
     new ControlSystemSynchronizationUtility(csManager));
-  TestableDoocsPVFactory testableFactory(NULL /*eqFct*/, syncUtil);
+  TestableDoocsPVFactory testableFactory(&myEqFct, syncUtil);
 
   ProcessVariable::SharedPtr processScalar = 
     csManager->getProcessArray<int64_t>("toDeviceInt");
-- 
GitLab