2 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <dali-test-suite-utils.h>
19 #include <dali/devel-api/threading/thread.h>
20 #include <dali/integration-api/events/touch-event-integ.h>
21 #include <dali/integration-api/events/touch-integ.h>
22 #include <dali/integration-api/render-task-list-integ.h>
23 #include <dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h>
24 #include <dali/internal/event/events/touch-event-impl.h>
25 #include <dali/internal/event/render-tasks/render-task-impl.h>
26 #include <dali/public-api/dali-core.h>
34 void utc_dali_gesture_detector_startup(void)
36 test_return_value = TET_UNDEF;
39 void utc_dali_gesture_detector_cleanup(void)
41 test_return_value = TET_PASS;
46 // Stores data that is populated in the callback and will be read by the TET cases
50 : functorCalled(false),
51 voidFunctorCalled(false),
59 functorCalled = false;
60 voidFunctorCalled = false;
62 receivedGesture.Reset();
68 bool voidFunctorCalled;
69 Gesture receivedGesture;
73 // Functor that sets the data when called
74 struct GestureReceivedFunctor
76 GestureReceivedFunctor(SignalData& data)
81 void operator()(Actor actor, const Gesture& gesture)
83 signalData.functorCalled = true;
84 signalData.receivedGesture = gesture;
85 signalData.pressedActor = actor;
90 signalData.voidFunctorCalled = true;
93 SignalData& signalData;
96 Integration::TouchEvent GenerateSingleTouch(PointState::Type state, const Vector2& screenPosition, int source, uint32_t time)
98 Integration::TouchEvent touchEvent;
99 Integration::Point point;
100 point.SetState(state);
101 point.SetDeviceId(4);
102 point.SetScreenPosition(screenPosition);
103 point.SetDeviceClass(Device::Class::TOUCH);
104 point.SetDeviceSubclass(Device::Subclass::NONE);
105 point.SetMouseButton(static_cast<MouseButton::Type>(source));
106 touchEvent.points.push_back(point);
107 touchEvent.time = time;
111 Integration::TouchEvent GenerateDoubleTouch(PointState::Type stateA, const Vector2& screenPositionA, PointState::Type stateB, const Vector2& screenPositionB, uint32_t time)
113 Integration::TouchEvent touchEvent;
114 Integration::Point point;
115 point.SetState(stateA);
116 point.SetDeviceId(4);
117 point.SetScreenPosition(screenPositionA);
118 point.SetDeviceClass(Device::Class::TOUCH);
119 point.SetDeviceSubclass(Device::Subclass::NONE);
120 touchEvent.points.push_back(point);
121 point.SetScreenPosition(screenPositionB);
122 point.SetState(stateB);
123 point.SetDeviceId(7);
124 touchEvent.points.push_back(point);
125 touchEvent.time = time;
131 int UtcDaliGestureDetectorConstructorN(void)
133 TestApplication application;
135 GestureDetector detector;
137 Actor actor = Actor::New();
141 detector.Attach(actor);
142 tet_result(TET_FAIL);
144 catch(DaliException& e)
146 DALI_TEST_ASSERT(e, "detector", TEST_LOCATION);
151 int UtcDaliGestureDetectorConstructorP(void)
153 TestApplication application;
155 // Use pan gesture as GestureDetector cannot be created.
156 GestureDetector detector = PanGestureDetector::New();
158 Actor actor = Actor::New();
162 detector.Attach(actor);
163 tet_result(TET_PASS);
165 catch(DaliException& e)
167 DALI_TEST_PRINT_ASSERT(e);
168 tet_result(TET_FAIL);
171 GestureDetector moved = std::move(detector);
172 DALI_TEST_CHECK(moved);
173 DALI_TEST_CHECK(!detector);
178 int UtcDaliGestureDetectorAssignP(void)
180 TestApplication application;
182 // Use pan gesture as GestureDetector cannot be created.
183 GestureDetector detector = PanGestureDetector::New();
184 GestureDetector detector2;
186 detector2 = detector;
188 Actor actor = Actor::New();
192 detector2.Attach(actor);
193 tet_result(TET_PASS);
195 catch(DaliException& e)
197 DALI_TEST_PRINT_ASSERT(e);
198 tet_result(TET_FAIL);
201 GestureDetector moved;
202 moved = std::move(detector2);
203 DALI_TEST_CHECK(moved);
204 DALI_TEST_CHECK(detector);
205 DALI_TEST_CHECK(!detector2);
209 int UtcDaliGestureDetectorDownCastP(void)
211 TestApplication application;
212 tet_infoline("Testing Dali::GestureDetector::DownCast()");
214 GestureDetector detector = PanGestureDetector::New();
216 BaseHandle object(detector);
218 GestureDetector detector2 = GestureDetector::DownCast(object);
219 DALI_TEST_CHECK(detector2);
221 GestureDetector detector3 = DownCast<GestureDetector>(object);
222 DALI_TEST_CHECK(detector3);
224 BaseHandle unInitializedObject;
225 GestureDetector detector4 = GestureDetector::DownCast(unInitializedObject);
226 DALI_TEST_CHECK(!detector4);
228 GestureDetector detector5 = DownCast<GestureDetector>(unInitializedObject);
229 DALI_TEST_CHECK(!detector5);
233 int UtcDaliGestureDetectorAttachP(void)
235 TestApplication application;
237 // Use pan gesture as GestureDetector cannot be created.
238 GestureDetector detector = PanGestureDetector::New();
240 Actor actor = Actor::New();
242 detector.Attach(actor);
245 for(size_t i = 0; i < detector.GetAttachedActorCount(); i++)
247 if(detector.GetAttachedActor(i) == actor)
249 tet_result(TET_PASS);
256 tet_result(TET_FAIL);
259 // Scoped gesture detector. GestureDetectors connect to a destroy signal of the actor. If the
260 // actor is still alive when the gesture detector is destroyed, then it should disconnect from
261 // this signal. If it does not, then when this function ends, there will be a segmentation fault
262 // thus, a TET case failure.
264 GestureDetector detector2 = PanGestureDetector::New();
265 detector2.Attach(actor);
270 int UtcDaliGestureDetectorAttachN(void)
272 TestApplication application;
274 // Use pan gesture as GestureDetector cannot be created.
275 GestureDetector detector = PanGestureDetector::New();
277 // Do not initialise actor
282 detector.Attach(actor);
283 tet_result(TET_FAIL);
285 catch(DaliException& e)
287 DALI_TEST_ASSERT(e, "actor", TEST_LOCATION);
292 int UtcDaliGestureDetectorDetachP(void)
294 TestApplication application;
296 // Use pan gesture as GestureDetector cannot be created.
297 GestureDetector detector = PanGestureDetector::New();
299 Actor actor = Actor::New();
300 detector.Attach(actor);
303 for(size_t i = 0; i < detector.GetAttachedActorCount(); i++)
305 if(detector.GetAttachedActor(i) == actor)
307 tet_result(TET_PASS);
314 tet_result(TET_FAIL);
317 // Detach and retrieve attached actors again, the vector should be empty.
318 detector.Detach(actor);
321 for(size_t i = 0; i < detector.GetAttachedActorCount(); i++)
323 if(detector.GetAttachedActor(i) == actor)
331 tet_result(TET_FAIL);
335 tet_result(TET_PASS);
341 int UtcDaliGestureDetectorDetachN01(void)
343 TestApplication application;
345 // Use pan gesture as GestureDetector cannot be created.
346 GestureDetector detector = PanGestureDetector::New();
348 // Do not initialise actor
353 detector.Detach(actor);
354 tet_result(TET_FAIL);
356 catch(DaliException& e)
358 DALI_TEST_ASSERT(e, "actor", TEST_LOCATION);
363 int UtcDaliGestureDetectorDetachN02(void)
365 TestApplication application;
367 // Use pan gesture as GestureDetector cannot be created.
368 GestureDetector detector = PanGestureDetector::New();
370 Actor actor = Actor::New();
371 detector.Attach(actor);
373 // Detach an actor that hasn't been attached. This should not cause an exception, it's a no-op.
376 Actor actor2 = Actor::New();
377 detector.Detach(actor2);
378 tet_result(TET_PASS);
380 catch(DaliException& e)
382 DALI_TEST_PRINT_ASSERT(e);
383 tet_result(TET_FAIL);
388 int UtcDaliGestureDetectorDetachN03(void)
390 TestApplication application;
392 // Use pan gesture as GestureDetector cannot be created.
393 GestureDetector detector = PanGestureDetector::New();
395 Actor actor = Actor::New();
396 detector.Attach(actor);
398 DALI_TEST_EQUALS(1, detector.GetAttachedActorCount(), TEST_LOCATION);
400 // Detach an actor twice - no exception should happen.
403 detector.Detach(actor);
404 detector.Detach(actor);
406 catch(DaliException& e)
408 DALI_TEST_PRINT_ASSERT(e);
409 tet_result(TET_FAIL);
412 DALI_TEST_EQUALS(0, detector.GetAttachedActorCount(), TEST_LOCATION);
417 int UtcDaliGestureDetectorDetachAllP(void)
419 TestApplication application;
421 // Use pan gesture as GestureDetector cannot be created.
422 GestureDetector detector = PanGestureDetector::New();
424 const unsigned int actorsToAdd = 5;
425 std::vector<Actor> myActors;
427 for(unsigned int i = 0; i < actorsToAdd; ++i)
429 Actor actor = Actor::New();
430 myActors.push_back(actor);
431 detector.Attach(actor);
434 DALI_TEST_EQUALS(actorsToAdd, detector.GetAttachedActorCount(), TEST_LOCATION);
436 // Detach and retrieve attached actors again, the vector should be empty.
437 detector.DetachAll();
439 DALI_TEST_EQUALS(0u, detector.GetAttachedActorCount(), TEST_LOCATION);
443 int UtcDaliGestureDetectorDetachAllN(void)
445 TestApplication application;
447 // Use pan gesture as GestureDetector cannot be created.
448 GestureDetector detector = PanGestureDetector::New();
450 const unsigned int actorsToAdd = 5;
451 std::vector<Actor> myActors;
453 for(unsigned int i = 0; i < actorsToAdd; ++i)
455 Actor actor = Actor::New();
456 myActors.push_back(actor);
457 detector.Attach(actor);
460 DALI_TEST_EQUALS(actorsToAdd, detector.GetAttachedActorCount(), TEST_LOCATION);
462 // Detach and retrieve attached actors again, the vector should be empty.
463 detector.DetachAll();
465 DALI_TEST_EQUALS(0u, detector.GetAttachedActorCount(), TEST_LOCATION);
467 // Call DetachAll again, there should not be any exception
470 detector.DetachAll();
472 catch(DaliException& e)
474 DALI_TEST_PRINT_ASSERT(e);
475 tet_result(TET_FAIL);
480 int UtcDaliGestureDetectorGetAttachedActors(void)
482 TestApplication application;
484 // Use pan gesture as GestureDetector cannot be created.
485 GestureDetector detector = PanGestureDetector::New();
487 // Initially there should not be any actors.
488 DALI_TEST_EQUALS(0u, detector.GetAttachedActorCount(), TEST_LOCATION);
491 Actor actor1 = Actor::New();
492 detector.Attach(actor1);
493 DALI_TEST_EQUALS(1u, detector.GetAttachedActorCount(), TEST_LOCATION);
495 // Attach another actor
496 Actor actor2 = Actor::New();
497 detector.Attach(actor2);
498 DALI_TEST_EQUALS(2u, detector.GetAttachedActorCount(), TEST_LOCATION);
500 // Attach another five actors
501 std::vector<Actor> myActors;
502 for(unsigned int i = 0; i < 5; ++i)
504 Actor actor = Actor::New();
505 myActors.push_back(actor);
506 detector.Attach(actor);
508 DALI_TEST_EQUALS(7u, detector.GetAttachedActorCount(), TEST_LOCATION);
511 detector.Detach(actor2);
512 DALI_TEST_EQUALS(6u, detector.GetAttachedActorCount(), TEST_LOCATION);
514 // Attach actor1 again, count should not increase.
515 detector.Attach(actor1);
516 DALI_TEST_EQUALS(6u, detector.GetAttachedActorCount(), TEST_LOCATION);
518 // Detach actor2 again, count should not decrease.
519 detector.Detach(actor2);
520 DALI_TEST_EQUALS(6u, detector.GetAttachedActorCount(), TEST_LOCATION);
523 detector.Detach(actor1);
524 DALI_TEST_EQUALS(5u, detector.GetAttachedActorCount(), TEST_LOCATION);
526 // Create scoped actor, actor should be automatically removed from the detector when it goes out
529 Actor scopedActor = Actor::New();
530 detector.Attach(scopedActor);
531 DALI_TEST_EQUALS(6u, detector.GetAttachedActorCount(), TEST_LOCATION);
533 DALI_TEST_EQUALS(5u, detector.GetAttachedActorCount(), TEST_LOCATION);
535 // Detach all so nothing remains.
536 detector.DetachAll();
537 DALI_TEST_EQUALS(0u, detector.GetAttachedActorCount(), TEST_LOCATION);
541 int UtcDaliGestureDetectorProperties(void)
543 TestApplication application;
545 // Use pinch gesture as that doen't currently have any properties. Will need to change it if default properties are added.
546 GestureDetector detector = PinchGestureDetector::New();
548 DALI_TEST_EQUALS(detector.GetPropertyCount(), 0u, TEST_LOCATION);
550 Property::IndexContainer indices;
551 detector.GetPropertyIndices(indices);
552 DALI_TEST_EQUALS(indices.Size(), 0u, TEST_LOCATION);
554 DALI_TEST_EQUALS(detector.IsPropertyWritable(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX), false, TEST_LOCATION);
555 DALI_TEST_EQUALS(detector.IsPropertyAnimatable(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX), false, TEST_LOCATION);
556 DALI_TEST_EQUALS(detector.IsPropertyAConstraintInput(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX), false, TEST_LOCATION);
557 DALI_TEST_EQUALS(detector.GetPropertyType(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX), Property::NONE, TEST_LOCATION);
558 DALI_TEST_EQUALS(detector.GetPropertyIndex("InvalidIndex"), Property::INVALID_INDEX, TEST_LOCATION);
560 Property::Value propValue = detector.GetProperty(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX);
561 DALI_TEST_EQUALS(propValue.GetType(), Property::NONE, TEST_LOCATION);
563 DALI_TEST_CHECK(detector.GetPropertyName(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX).empty());
565 // For coverage only, not testable
566 detector.SetProperty(DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX, true);
571 int UtcDaliGestureDetectorRegisterProperty(void)
573 TestApplication application;
575 GestureDetector detector = PinchGestureDetector::New();
577 Property::Index index = detector.RegisterProperty("sceneProperty", 0);
578 DALI_TEST_EQUALS(index, (Property::Index)PROPERTY_CUSTOM_START_INDEX, TEST_LOCATION);
579 DALI_TEST_EQUALS(detector.GetProperty<int32_t>(index), 0, TEST_LOCATION);
581 detector.SetProperty(index, -123);
582 DALI_TEST_EQUALS(detector.GetProperty<int32_t>(index), -123, TEST_LOCATION);
584 using Dali::Animation;
585 Animation animation = Animation::New(1.0f);
586 animation.AnimateTo(Property(detector, index), 99);
588 DALI_TEST_EQUALS(detector.GetProperty<int32_t>(index), -123, TEST_LOCATION);
589 // Start the animation
592 application.SendNotification();
593 application.Render(1000 /* 100% progress */);
594 DALI_TEST_EQUALS(detector.GetProperty<int32_t>(index), 99, TEST_LOCATION);
599 int UtcDaliGestureDetectorCancelProcessing(void)
601 TestApplication application;
602 Integration::Scene scene = application.GetScene();
603 RenderTaskList taskList = scene.GetRenderTaskList();
604 Dali::RenderTask task = taskList.GetTask(0);
606 LongPressGestureDetector longDetector = LongPressGestureDetector::New();
607 TapGestureDetector tapDetector = TapGestureDetector::New();
608 PanGestureDetector panDetector = PanGestureDetector::New();
609 PinchGestureDetector pinchDetector = PinchGestureDetector::New();
610 RotationGestureDetector rotationDetector = RotationGestureDetector::New();
612 Actor actor = Actor::New();
613 actor.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
614 actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
616 application.GetScene().Add(actor);
619 application.SendNotification();
620 application.Render();
623 GestureReceivedFunctor functor(data);
626 GestureReceivedFunctor tFunctor(tData);
629 GestureReceivedFunctor pFunctor(pData);
631 longDetector.DetectedSignal().Connect(&application, functor);
632 tapDetector.DetectedSignal().Connect(&application, tFunctor);
633 pinchDetector.DetectedSignal().Connect(&application, pFunctor);
635 Integration::TouchEvent tp = GenerateSingleTouch(PointState::DOWN, Vector2(50.0f, 50.0f), 1, 100);
636 Internal::TouchEventPtr touchEventImpl(new Internal::TouchEvent(100));
637 touchEventImpl->AddPoint(tp.GetPoint(0));
638 touchEventImpl->SetRenderTask(task);
639 Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
640 longDetector.HandleEvent(actor, touchEventHandle);
641 tapDetector.HandleEvent(actor, touchEventHandle);
642 panDetector.HandleEvent(actor, touchEventHandle);
643 pinchDetector.HandleEvent(actor, touchEventHandle);
644 rotationDetector.HandleEvent(actor, touchEventHandle);
646 TestTriggerLongPress(application);
647 longDetector.CancelAllOtherGestureDetectors();
649 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
650 DALI_TEST_EQUALS(false, tData.functorCalled, TEST_LOCATION);
654 tp = GenerateSingleTouch(PointState::UP, Vector2(50.0f, 50.0f), 1, 650);
655 touchEventImpl = new Internal::TouchEvent(650);
656 touchEventImpl->AddPoint(tp.GetPoint(0));
657 touchEventImpl->SetRenderTask(task);
658 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
659 longDetector.HandleEvent(actor, touchEventHandle);
660 tapDetector.HandleEvent(actor, touchEventHandle);
661 panDetector.HandleEvent(actor, touchEventHandle);
662 pinchDetector.HandleEvent(actor, touchEventHandle);
663 rotationDetector.HandleEvent(actor, touchEventHandle);
665 DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
666 DALI_TEST_EQUALS(false, tData.functorCalled, TEST_LOCATION);
670 longDetector.SetTouchesRequired(2, 2);
672 tp = GenerateDoubleTouch(PointState::DOWN, Vector2(2.0f, 20.0f), PointState::DOWN, Vector2(38.0f, 20.0f), 100);
673 touchEventImpl = new Internal::TouchEvent(100);
674 touchEventImpl->AddPoint(tp.GetPoint(0));
675 touchEventImpl->AddPoint(tp.GetPoint(1));
676 touchEventImpl->SetRenderTask(task);
677 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
678 longDetector.HandleEvent(actor, touchEventHandle);
679 tapDetector.HandleEvent(actor, touchEventHandle);
680 panDetector.HandleEvent(actor, touchEventHandle);
681 pinchDetector.HandleEvent(actor, touchEventHandle);
682 rotationDetector.HandleEvent(actor, touchEventHandle);
684 pinchDetector.CancelAllOtherGestureDetectors();
686 tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 150);
687 touchEventImpl = new Internal::TouchEvent(150);
688 touchEventImpl->AddPoint(tp.GetPoint(0));
689 touchEventImpl->AddPoint(tp.GetPoint(1));
690 touchEventImpl->SetRenderTask(task);
691 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
692 longDetector.HandleEvent(actor, touchEventHandle);
693 tapDetector.HandleEvent(actor, touchEventHandle);
694 panDetector.HandleEvent(actor, touchEventHandle);
695 pinchDetector.HandleEvent(actor, touchEventHandle);
696 rotationDetector.HandleEvent(actor, touchEventHandle);
698 tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 200);
699 touchEventImpl = new Internal::TouchEvent(200);
700 touchEventImpl->AddPoint(tp.GetPoint(0));
701 touchEventImpl->AddPoint(tp.GetPoint(1));
702 touchEventImpl->SetRenderTask(task);
703 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
704 longDetector.HandleEvent(actor, touchEventHandle);
705 tapDetector.HandleEvent(actor, touchEventHandle);
706 panDetector.HandleEvent(actor, touchEventHandle);
707 pinchDetector.HandleEvent(actor, touchEventHandle);
708 rotationDetector.HandleEvent(actor, touchEventHandle);
710 tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 250);
711 touchEventImpl = new Internal::TouchEvent(250);
712 touchEventImpl->AddPoint(tp.GetPoint(0));
713 touchEventImpl->AddPoint(tp.GetPoint(1));
714 touchEventImpl->SetRenderTask(task);
715 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
716 longDetector.HandleEvent(actor, touchEventHandle);
717 tapDetector.HandleEvent(actor, touchEventHandle);
718 panDetector.HandleEvent(actor, touchEventHandle);
719 pinchDetector.HandleEvent(actor, touchEventHandle);
720 rotationDetector.HandleEvent(actor, touchEventHandle);
722 tp = GenerateDoubleTouch(PointState::MOTION, Vector2(10.0f, 20.0f), PointState::MOTION, Vector2(30.0f, 20.0f), 300);
723 touchEventImpl = new Internal::TouchEvent(300);
724 touchEventImpl->AddPoint(tp.GetPoint(0));
725 touchEventImpl->AddPoint(tp.GetPoint(1));
726 touchEventImpl->SetRenderTask(task);
727 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
728 longDetector.HandleEvent(actor, touchEventHandle);
729 tapDetector.HandleEvent(actor, touchEventHandle);
730 panDetector.HandleEvent(actor, touchEventHandle);
731 pinchDetector.HandleEvent(actor, touchEventHandle);
732 rotationDetector.HandleEvent(actor, touchEventHandle);
734 tp = GenerateDoubleTouch(PointState::UP, Vector2(10.0f, 20.0f), PointState::UP, Vector2(30.0f, 20.0f), 350);
735 touchEventImpl = new Internal::TouchEvent(350);
736 touchEventImpl->AddPoint(tp.GetPoint(0));
737 touchEventImpl->AddPoint(tp.GetPoint(1));
738 touchEventImpl->SetRenderTask(task);
739 touchEventHandle = Dali::TouchEvent(touchEventImpl.Get());
740 longDetector.HandleEvent(actor, touchEventHandle);
741 tapDetector.HandleEvent(actor, touchEventHandle);
742 panDetector.HandleEvent(actor, touchEventHandle);
743 pinchDetector.HandleEvent(actor, touchEventHandle);
744 rotationDetector.HandleEvent(actor, touchEventHandle);
746 DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
747 DALI_TEST_EQUALS(false, tData.functorCalled, TEST_LOCATION);
748 DALI_TEST_EQUALS(true, pData.functorCalled, TEST_LOCATION);
756 int UtcDaliGestureDetectorDestructWorkerThreadN(void)
758 TestApplication application;
759 tet_infoline("UtcDaliGestureDetectorDestructWorkerThreadN Test, for line coverage");
763 class TestThread : public Thread
768 tet_printf("Run TestThread\n");
769 // Destruct at worker thread.
770 mGestureDetector.Reset();
773 Dali::GestureDetector mGestureDetector;
777 GestureDetector detector = PanGestureDetector::New();
778 thread.mGestureDetector = std::move(detector);
790 DALI_TEST_CHECK(true);