2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
17 #include "test-gesture-manager.h"
22 TestGestureManager::TestGestureManager()
30 TestGestureManager::~TestGestureManager()
35 * @copydoc Dali::Integration::GestureManager::Register(Gesture::Type)
37 void TestGestureManager::Register(const Integration::GestureRequest& request)
39 mFunctionsCalled.Register = true;
43 * @copydoc Dali::Integration::GestureManager::Unregister(Gesture::Type)
45 void TestGestureManager::Unregister(const Integration::GestureRequest& request)
47 mFunctionsCalled.Unregister = true;
51 * @copydoc Dali::Integration::GestureManager::Update(Gesture::Type)
53 void TestGestureManager::Update(const Integration::GestureRequest& request)
55 mFunctionsCalled.Update = true;
59 /** Call this every test */
60 void TestGestureManager::Initialize()
62 mFunctionsCalled.Reset();
65 bool TestGestureManager::WasCalled(TestFuncEnum func)
69 case RegisterType: return mFunctionsCalled.Register;
70 case UnregisterType: return mFunctionsCalled.Unregister;
71 case UpdateType: return mFunctionsCalled.Update;
76 void TestGestureManager::ResetCallStatistics(TestFuncEnum func)
80 case RegisterType: mFunctionsCalled.Register = false; break;
81 case UnregisterType: mFunctionsCalled.Unregister = false; break;
82 case UpdateType: mFunctionsCalled.Update = false; break;
86 TestGestureManager::TestFunctions::TestFunctions()
93 void TestGestureManager::TestFunctions::Reset()