Adding ObjectDestructionTracker to dali-test-suite-utils for testing object destruction
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-TapGestureDetector.cpp
index ded75a2..d6300de 100644 (file)
@@ -147,6 +147,30 @@ int UtcDaliTapGestureDetectorConstructor(void)
   END_TEST;
 }
 
+int UtcDaliTapGestureDetectorCopyConstructorP(void)
+{
+  TestApplication application;
+
+  TapGestureDetector detector = TapGestureDetector::New();
+
+  TapGestureDetector copy( detector );
+  DALI_TEST_CHECK( detector );
+  END_TEST;
+}
+
+int UtcDaliTapGestureDetectorAssignmentOperatorP(void)
+{
+  TestApplication application;
+
+  TapGestureDetector detector = TapGestureDetector::New();;
+
+  TapGestureDetector assign;
+  assign = detector;
+  DALI_TEST_CHECK( detector );
+
+  DALI_TEST_CHECK( detector == assign );
+  END_TEST;
+}
 
 int UtcDaliTapGestureDetectorNew(void)
 {
@@ -184,7 +208,10 @@ int UtcDaliTapGestureDetectorNew(void)
   actor.TouchedSignal().Connect( &application, touchFunctor );
 
   Integration::TouchEvent touchEvent(1);
-  TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+  Integration::Point point;
+  point.SetDeviceId( 1 );
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
@@ -542,7 +569,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
 
   Actor actor = Actor::New();
   actor.SetSize(100.0f, 100.0f);
-  actor.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+  actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
   Stage::GetCurrent().Add(actor);
 
   // Render and notify
@@ -565,7 +592,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
   DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
 
   // Rotate actor again and render
-  actor.SetRotation(Dali::Degree(180.0f), Vector3::ZAXIS);
+  actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
   application.SendNotification();
   application.Render();
 
@@ -579,7 +606,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
   DALI_TEST_EQUALS( Vector2(5.0f, 5.0f), data.receivedGesture.screenPoint, 0.1, TEST_LOCATION);
 
   // Rotate actor again and render
-  actor.SetRotation(Dali::Degree(90.0f), Vector3::YAXIS);
+  actor.SetOrientation(Dali::Degree(90.0f), Vector3::YAXIS);
   application.SendNotification();
   application.Render();
 
@@ -607,7 +634,7 @@ int UtcDaliTapGestureSignalReceptionChildHit(void)
   child.SetSize(100.0f, 100.0f);
   child.SetAnchorPoint(AnchorPoint::CENTER);
   child.SetParentOrigin(ParentOrigin::CENTER);
-  child.SetRotation(Dali::Degree(90.0f), Vector3::ZAXIS);
+  child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
   parent.Add(child);
 
   TouchEventFunctor touchFunctor;
@@ -1249,7 +1276,7 @@ int UtcDaliTapGestureBehindTouchableSystemOverlay(void)
   touchData.Reset();
 
   // Do touch in the same area
-  application.ProcessEvent( touchFunctor.GenerateSingleTouch( TouchPoint::Down, screenCoords ) );
+  application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION );
 
@@ -1304,7 +1331,7 @@ int UtcDaliTapGestureTouchBehindGesturedSystemOverlay(void)
   touchData.Reset();
 
   // Do touch in the same area
-  application.ProcessEvent( touchFunctor.GenerateSingleTouch( TouchPoint::Down, screenCoords ) );
+  application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION );