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 <dali-test-suite-utils.h>
19 #include <dali/internal/event/common/scene-impl.h>
20 #include <dali/internal/event/events/tap-gesture/tap-gesture-event.h>
21 #include <dali/internal/event/events/tap-gesture/tap-gesture-processor.h>
22 #include <dali/public-api/dali-core.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;
41 void TestAbortWithState(GestureState state)
43 TestApplication application;
45 Internal::TapGestureProcessor processor;
46 Integration::Scene scene(application.GetScene());
47 Internal::Scene& sceneImpl = GetImplementation(scene);
48 Internal::TapGestureEvent event(state);
52 processor.Process(sceneImpl, event);
53 DALI_TEST_CHECK(false); // Should not get here as we expect an abort
57 DALI_TEST_CHECK(true); // We aborted, so the test has passed
63 int UtcDaliTapGestureProcessorProcessClearStateN(void)
65 TestAbortWithState(GestureState::CLEAR);
69 int UtcDaliTapGestureProcessorProcessContinuingStateN(void)
71 TestAbortWithState(GestureState::CONTINUING);
75 int UtcDaliTapGestureProcessorProcessFinishedStateN(void)
77 TestAbortWithState(GestureState::FINISHED);