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.
21 #include <dali/public-api/dali-core.h>
22 #include <dali-test-suite-utils.h>
23 #include <dali/internal/event/events/tap-gesture/tap-gesture-processor.h>
24 #include <dali/internal/event/events/tap-gesture/tap-gesture-event.h>
25 #include <dali/internal/event/common/scene-impl.h>
29 void utc_dali_internal_tap_gesture_processor_startup(void)
31 test_return_value = TET_UNDEF;
34 void utc_dali_internal_tap_gesture_processor_cleanup(void)
36 test_return_value = TET_PASS;
42 void TestAbortWithState(GestureState state)
44 TestApplication application;
46 Internal::TapGestureProcessor processor;
47 Integration::Scene scene( application.GetScene() );
48 Internal::Scene& sceneImpl = GetImplementation( scene );
49 Internal::TapGestureEvent event(state);
53 processor.Process(sceneImpl, event);
54 DALI_TEST_CHECK( false ); // Should not get here as we expect an abort
58 DALI_TEST_CHECK( true ); // We aborted, so the test has passed
64 int UtcDaliTapGestureProcessorProcessClearStateN(void)
66 TestAbortWithState(GestureState::CLEAR);
70 int UtcDaliTapGestureProcessorProcessContinuingStateN(void)
72 TestAbortWithState(GestureState::CONTINUING);
76 int UtcDaliTapGestureProcessorProcessFinishedStateN(void)
78 TestAbortWithState(GestureState::FINISHED);