Add UTCs for TextSelectionPopup
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextSelectionPopup.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #include <iostream>
19 #include <stdlib.h>
20 #include <dali-toolkit-test-suite-utils.h>
21 #include <dali-toolkit/dali-toolkit.h>
22
23 using namespace Dali;
24 using namespace Toolkit;
25
26 void dali_textselectionpopup_startup(void)
27 {
28   test_return_value = TET_UNDEF;
29 }
30
31 void dali_textselectionpopup_cleanup(void)
32 {
33   test_return_value = TET_PASS;
34 }
35
36 int UtcDaliToolkitTextSelectionPopupNewP(void)
37 {
38   ToolkitTestApplication application;
39   TextSelectionPopup textSelectionPopup;
40
41   DALI_TEST_CHECK( !textSelectionPopup );
42
43   textSelectionPopup = TextSelectionPopup::New();
44
45   DALI_TEST_CHECK( textSelectionPopup );
46   END_TEST;
47 }
48
49 int UtcDaliToolkitTextSelectionPopupConstructorP(void)
50 {
51   TextSelectionPopup textSelectionPopup;
52
53   DALI_TEST_CHECK( !textSelectionPopup );
54
55   END_TEST;
56 }
57
58 int UtcDaliToolkitTextSelectionPopupCopyConstructorP(void)
59 {
60   ToolkitTestApplication application;
61   TextSelectionPopup textSelectionPopup;
62
63   textSelectionPopup = TextSelectionPopup::New();
64   TextSelectionPopup copy( textSelectionPopup );
65
66   DALI_TEST_CHECK( copy == textSelectionPopup );
67
68   END_TEST;
69 }
70
71
72 int UtcDaliToolkitTextSelectionPopupDestructorP(void)
73 {
74   ToolkitTestApplication application;
75   TextSelectionPopup* textSelectionPopup = new TextSelectionPopup;
76   delete textSelectionPopup;
77
78   DALI_TEST_CHECK( true );
79
80   END_TEST;
81 }
82
83 int UtcDaliToolkitTextSelectionPopupAssignmentOperatorP(void)
84 {
85   ToolkitTestApplication application;
86   TextSelectionPopup textSelectionPopup;
87   textSelectionPopup = TextSelectionPopup::New();
88   TextSelectionPopup copy;
89   copy = textSelectionPopup;
90
91   DALI_TEST_CHECK( copy == textSelectionPopup );
92   END_TEST;
93 }
94
95 int UtcDaliToolkitTextSelectionPopupDownCastP(void)
96 {
97   ToolkitTestApplication application;
98   TextSelectionPopup textSelectionPopup;
99   textSelectionPopup = TextSelectionPopup::New();
100
101   TextSelectionPopup cast = TextSelectionPopup::DownCast( textSelectionPopup );
102
103   DALI_TEST_CHECK( cast );
104
105   END_TEST;
106 }