- DALI_TEST_EQUALS(1u, detector.GetTapsRequired(), TEST_LOCATION);
- END_TEST;
-}
-
-int UtcDaliTapGestureSetTouchesRequired(void)
-{
- TestApplication application;
-
- TapGestureDetector detector = TapGestureDetector::New();
-
- unsigned int max = 3;
-
- DALI_TEST_CHECK(max != detector.GetTouchesRequired());
-
- detector.SetTouchesRequired(max);
-
- DALI_TEST_EQUALS(max, detector.GetTouchesRequired(), TEST_LOCATION);
-
- // Attach an actor and change the maximum touches
-
- Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(actor);
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- SignalData data;
- GestureReceivedFunctor functor(data);
-
- detector.Attach(actor);
- detector.DetectedSignal().Connect( &application, functor );
-
- TestGestureManager& gestureManager = application.GetGestureManager();
- gestureManager.Initialize();
-
- detector.SetTouchesRequired(4);
-
- // Gesture detection should have been updated only
- DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
- DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
- DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
-
- // Reset values
- gestureManager.Initialize();
-
- // Create a second gesture detector that requires even less maximum touches
- TapGestureDetector secondDetector = TapGestureDetector::New();
- secondDetector.Attach(actor);
-
- // Gesture detection should have been updated
- DALI_TEST_EQUALS(true, gestureManager.WasCalled(TestGestureManager::UpdateType), TEST_LOCATION);
- DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::RegisterType), TEST_LOCATION);
- DALI_TEST_EQUALS(false, gestureManager.WasCalled(TestGestureManager::UnregisterType), TEST_LOCATION);
- END_TEST;
-}
-
-int UtcDaliTapGestureGetTouchesRequired(void)
-{
- TestApplication application;
-
- TapGestureDetector detector = TapGestureDetector::New();
- DALI_TEST_EQUALS(1u, detector.GetTouchesRequired(), TEST_LOCATION);