2 * Copyright 2012 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://www.tizenopensource.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.
22 #include <ui-gadget.h>
23 #include <Elementary.h>
26 static Evas_Object *win;
28 static void startup(void);
29 static void cleanup(void);
31 static void utc_ApplicationFW_ug_init_func_01(void);
32 static void utc_ApplicationFW_ug_init_func_02(void);
34 void (*tet_startup)(void) = startup;
35 void (*tet_cleanup)(void) = cleanup;
38 POSITIVE_TC_IDX = 0x01,
42 struct tet_testlist tet_testlist[] = {
43 { utc_ApplicationFW_ug_init_func_01, POSITIVE_TC_IDX },
44 { utc_ApplicationFW_ug_init_func_02, NEGATIVE_TC_IDX },
48 static void startup(void)
52 win = elm_win_add(NULL, "UI gadget test", ELM_WIN_BASIC);
54 err = "Cannot create window";
56 tet_delete(POSITIVE_TC_IDX, err);
60 static void cleanup(void)
68 * @brief Positive test case of ug_init API
70 static void utc_ApplicationFW_ug_init_func_01(void)
75 for (opt = UG_OPT_INDICATOR_ENABLE; opt < UG_OPT_MAX; opt++) {
76 r = UG_INIT_EFL(win, UG_OPT_INDICATOR_ENABLE);
78 tet_infoline("ug_init() failed in positive test case");
87 * @brief Negative test case of ug_init API
89 static void utc_ApplicationFW_ug_init_func_02(void)
93 r = UG_INIT_EFL(win, -1);
95 tet_infoline("ug_init() failed in negative test case");
100 r = UG_INIT_EFL(win, UG_OPT_MAX);
102 tet_infoline("ug_init() failed in negative test case");
103 tet_result(TET_FAIL);
107 tet_result(TET_PASS);