2 * Copyright (c) 2014 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 "test-gesture-manager.h"
23 TestGestureManager::TestGestureManager()
31 TestGestureManager::~TestGestureManager()
36 * @copydoc Dali::Integration::GestureManager::Register(Gesture::Type)
38 void TestGestureManager::Register(const Integration::GestureRequest& request)
40 mFunctionsCalled.Register = true;
44 * @copydoc Dali::Integration::GestureManager::Unregister(Gesture::Type)
46 void TestGestureManager::Unregister(const Integration::GestureRequest& request)
48 mFunctionsCalled.Unregister = true;
52 * @copydoc Dali::Integration::GestureManager::Update(Gesture::Type)
54 void TestGestureManager::Update(const Integration::GestureRequest& request)
56 mFunctionsCalled.Update = true;
60 /** Call this every test */
61 void TestGestureManager::Initialize()
63 mFunctionsCalled.Reset();
66 bool TestGestureManager::WasCalled(TestFuncEnum func)
70 case RegisterType: return mFunctionsCalled.Register;
71 case UnregisterType: return mFunctionsCalled.Unregister;
72 case UpdateType: return mFunctionsCalled.Update;
77 void TestGestureManager::ResetCallStatistics(TestFuncEnum func)
81 case RegisterType: mFunctionsCalled.Register = false; break;
82 case UnregisterType: mFunctionsCalled.Unregister = false; break;
83 case UpdateType: mFunctionsCalled.Update = false; break;
87 TestGestureManager::TestFunctions::TestFunctions()
94 void TestGestureManager::TestFunctions::Reset()