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.
20 #include <dali/dali.h>
21 #include <dali-test-suite-utils.h>
25 void utc_dali_long_press_gesture_startup(void)
27 test_return_value = TET_UNDEF;
30 void utc_dali_long_press_gesture_cleanup(void)
32 test_return_value = TET_PASS;
36 // Positive test case for a method
37 int UtcDaliLongPressGestureConstructor(void)
39 TestApplication application; // Reset all test adapter return codes
41 LongPressGesture gesture( Gesture::Started );
42 DALI_TEST_EQUALS(1u, gesture.numberOfTouches, TEST_LOCATION);
43 DALI_TEST_EQUALS(Gesture::LongPress, gesture.type, TEST_LOCATION);
45 // Test Copy constructor
46 gesture.numberOfTouches = 5u;
48 LongPressGesture gesture2(gesture);
49 DALI_TEST_EQUALS(5u, gesture2.numberOfTouches, TEST_LOCATION);
50 DALI_TEST_EQUALS(Gesture::LongPress, gesture2.type, TEST_LOCATION);
51 DALI_TEST_EQUALS(Gesture::Started, gesture2.state, TEST_LOCATION);
55 int UtcDaliLongPressGestureAssignment(void)
57 // Test Assignment operator
58 LongPressGesture gesture( Gesture::Started );
59 DALI_TEST_EQUALS(1u, gesture.numberOfTouches, TEST_LOCATION);
60 DALI_TEST_EQUALS(Gesture::LongPress, gesture.type, TEST_LOCATION);
62 gesture.numberOfTouches = 5u;
64 LongPressGesture gesture2( Gesture::Finished );
65 DALI_TEST_EQUALS(Gesture::Finished, gesture2.state, TEST_LOCATION);
67 DALI_TEST_EQUALS(5u, gesture2.numberOfTouches, TEST_LOCATION);
68 DALI_TEST_EQUALS(Gesture::LongPress, gesture2.type, TEST_LOCATION);
69 DALI_TEST_EQUALS(Gesture::Started, gesture2.state, TEST_LOCATION);