Fixing build break in test cases 06/24206/1
authorDavid Steele <david.steele@partner.samsung.com>
Wed, 2 Jul 2014 18:01:22 +0000 (19:01 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 17:48:05 +0000 (18:48 +0100)
Change-Id: I90b9fa85d526ec343ff8d31e887069d272618983
Signed-off-by: David Steele <david.steele@partner.samsung.com>
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp

index 8e1473ea7c4652340406f49307baf085586646b3..49fe95b47be52a0ea50e195a70b2cda0caac8576 100644 (file)
@@ -26,14 +26,11 @@ namespace Toolkit
 {
 
 DummyControl::DummyControl()
-: mCustomSlot1Called(false)
 {
 }
 
 DummyControl::DummyControl(const DummyControl& control)
-: Control( control ),
-  mCustomSlot1Called(false),
-  mCustomSlot1Value(Vector3::ZERO)
+: Control( control )
 {
 }
 
@@ -53,7 +50,7 @@ DummyControl& DummyControl::operator=(const DummyControl& control)
 }
 
 // Used to test signal connections
-void DummyControl::CustomSlot1( Actor actor, const Vector3& value )
+void DummyControlImpl::CustomSlot1( Actor actor, const Vector3& value )
 {
   mCustomSlot1Called = true;
   mCustomSlot1Value = value;
@@ -68,10 +65,13 @@ DummyControl DummyControlImpl::New()
 }
 
 DummyControlImpl::DummyControlImpl()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+  mCustomSlot1Called(false),
+  mCustomSlot1Value(Vector3::ZERO)
 {
 }
 
+
 DummyControlImpl::~DummyControlImpl()
 {
 }
@@ -147,16 +147,12 @@ DummyControl DummyControl::New( bool override )
 }
 
 DummyControl::DummyControl( DummyControlImpl& implementation )
-: Control( implementation ),
-  mCustomSlot1Called(false),
-  mCustomSlot1Value(Vector3::ZERO)
+: Control( implementation )
 {
 }
 
 DummyControl::DummyControl( Dali::Internal::CustomActor* internal )
-: Control( internal ),
-  mCustomSlot1Called(false),
-  mCustomSlot1Value(Vector3::ZERO)
+: Control( internal )
 {
   VerifyCustomActorPointer<DummyControlImpl>(internal);
 }
index 13d34a4abea5190e3e2319670d596bcb9b4ec5f1..0ebf48cc33e4c59dfcb65d1c4ca4b88188a6f65f 100644 (file)
@@ -38,7 +38,7 @@ public:
 
   DummyControl();
   DummyControl(const DummyControl& control);
-  virtual ~DummyControl();
+  ~DummyControl();
 
   static DummyControl New( bool override = false );
 
@@ -47,14 +47,6 @@ public:
 
   DummyControl& operator=(const DummyControl& control);
 
-  // Used to test signal connections
-  void CustomSlot1( Actor actor, const Vector3& value );
-
-public:
-
-  bool mCustomSlot1Called;
-  Vector3 mCustomSlot1Value;
-
 public: // Not intended for application developers
 
   DummyControl( DummyControlImpl& implementation );
@@ -79,6 +71,12 @@ public:
   inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
   inline LongPressGestureDetector GetLongPressGestureDetector() const { return Internal::Control::GetLongPressGestureDetector(); }
 
+  // Used to test signal connections
+  void CustomSlot1( Actor actor, const Vector3& value );
+
+  bool mCustomSlot1Called;
+  Vector3 mCustomSlot1Value;
+
 protected:
 
   DummyControlImpl();
index 3fa897afcb50a8b87ef72814d3ed4429f194e4ce..49a49c5cf74d6b5977c78e0fea94793d9383dace 100644 (file)
@@ -72,6 +72,14 @@ void TestGlAbstraction::Initialize()
   mProgramUniforms4f.clear();
 }
 
+void TestGlAbstraction::PreRender()
+{
+}
+
+void TestGlAbstraction::PostRender(unsigned int timeDelta)
+{
+}
+
 } // Namespace dali
 
 bool BlendEnabled(const Dali::TraceCallStack& callStack)
index 06357b488de1e070fbb83131e2e80a8a318513f4..c17fa22ce7b554ce91035a8e4cdbad1970f56184 100644 (file)
@@ -51,6 +51,9 @@ public:
   ~TestGlAbstraction();
   void Initialize();
 
+  void PreRender();
+  void PostRender(unsigned int timeDelta);
+
   /* OpenGL ES 2.0 */
 
   inline void ActiveTexture( GLenum textureUnit )
index 0082fa7230fd219f4a0a239c504fa21a458c577f..5e78d318f70a4764c9f31a98efe10a4baea53619 100644 (file)
@@ -268,23 +268,27 @@ int UtcDaliControlSignalConnectDisconnect(void)
 
     Actor actor = Actor::New();
     DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
-    actor.SetSizeSignal().Connect( &dummy, &DummyControl::CustomSlot1 );
+    Toolkit::Internal::Control& control = dummy.GetImplementation();
+    DummyControlImpl* dummyImpl = dynamic_cast<DummyControlImpl*>(&control);
+    DALI_TEST_CHECK( dummyImpl );
+
+    actor.SetSizeSignal().Connect( dummyImpl, &DummyControlImpl::CustomSlot1 );
     DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Value,  Vector3::ZERO, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value,  Vector3::ZERO, TEST_LOCATION );
 
     const Vector3 newSize( 10, 10, 0 );
     actor.SetSize( newSize );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Called, true, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Value,  newSize, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value,  newSize, TEST_LOCATION );
 
-    dummy.mCustomSlot1Called = false;
-    actor.SetSizeSignal().Disconnect( &dummy, &DummyControl::CustomSlot1 );
+    dummyImpl->mCustomSlot1Called = false;
+    actor.SetSizeSignal().Disconnect( dummyImpl, &DummyControlImpl::CustomSlot1 );
     DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 0u, TEST_LOCATION );
     const Vector3 ignoredSize( 20, 20, 0 );
     actor.SetSize( ignoredSize );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Value,  newSize/*not ignoredSize*/, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value,  newSize/*not ignoredSize*/, TEST_LOCATION );
   }
   END_TEST;
 }
@@ -297,16 +301,19 @@ int UtcDaliControlSignalAutomaticDisconnect(void)
 
   {
     DummyControl dummy = DummyControlImpl::New();
+    Toolkit::Internal::Control& control = dummy.GetImplementation();
+    DummyControlImpl* dummyImpl = dynamic_cast<DummyControlImpl*>(&control);
+    DALI_TEST_CHECK( dummyImpl );
 
-    actor.SetSizeSignal().Connect( &dummy, &DummyControl::CustomSlot1 );
+    actor.SetSizeSignal().Connect( dummyImpl, &DummyControlImpl::CustomSlot1 );
     DALI_TEST_EQUALS( actor.SetSizeSignal().GetConnectionCount(), 1u, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Called, false, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Value,  Vector3::ZERO, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, false, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value,  Vector3::ZERO, TEST_LOCATION );
 
     const Vector3 newSize( 10, 10, 0 );
     actor.SetSize( newSize );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Called, true, TEST_LOCATION );
-    DALI_TEST_EQUALS( dummy.mCustomSlot1Value,  newSize, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Called, true, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl->mCustomSlot1Value,  newSize, TEST_LOCATION );
   }
   // dummyControl automatically disconnects
 
@@ -344,8 +351,6 @@ int UtcDaliControlTestParameters(void)
   DALI_TEST_CHECK( test.GetMaximumSize() == maxSize );
 
   test.KeyEventSignal();
-  DummyControl test2 = DummyControl::New();
-  dynamic_cast< ConnectionTrackerInterface& >( test2 ).GetConnectionCount();
 
   // Provide coverage for pointer destructor
   Control* testControlPtr = new Control;