4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #include <app-checker.h>
24 static void startup(void);
25 static void cleanup(void);
27 void (*tet_startup) (void) = startup;
28 void (*tet_cleanup) (void) = cleanup;
30 static void utc_ApplicationFW_ac_register_launch_privilege_func_01(void);
31 static void utc_ApplicationFW_ac_register_launch_privilege_func_02(void);
32 static void utc_ApplicationFW_ac_register_launch_privilege_func_03(void);
33 static void utc_ApplicationFW_ac_register_launch_privilege_func_04(void);
36 POSITIVE_TC_IDX = 0x01,
40 struct tet_testlist tet_testlist[] = {
41 {utc_ApplicationFW_ac_register_launch_privilege_func_01,
43 {utc_ApplicationFW_ac_register_launch_privilege_func_02,
45 {utc_ApplicationFW_ac_register_launch_privilege_func_03,
47 {utc_ApplicationFW_ac_register_launch_privilege_func_04,
52 static void startup(void)
56 static void cleanup(void)
60 *int ac_register_launch_privilege(const char *pkg_name,
61 * const char *pkg_type);
65 * @brief Positive test case of ac_register_launch_privilege()
67 static void utc_ApplicationFW_ac_register_launch_privilege_func_01(void)
70 r = ac_register_launch_privilege("com.samsung.calculator", "deb");
71 if (r < 0 && r != AC_R_ENOPULUGINS) {
73 ("ac_register_launch_privilege()"
74 " failed in positive test case");
82 * @brief Negative test case 01 of ac_register_launch_privilege()
84 static void utc_ApplicationFW_ac_register_launch_privilege_func_02(void)
87 r = ac_register_launch_privilege(NULL, "deb");
88 if (r != AC_R_EINVAL) {
90 ("ac_register_launch_privilege()"
91 " failed in negative test case");
99 * @brief Negative test case 02 of ac_register_launch_privilege()
101 static void utc_ApplicationFW_ac_register_launch_privilege_func_03(void)
104 r = ac_register_launch_privilege("com.samsung.calculator", NULL);
105 if (r != AC_R_EINVAL) {
107 ("ac_register_launch_privilege()"
108 " failed in negative test case");
109 tet_result(TET_FAIL);
112 tet_result(TET_PASS);
116 * @brief Negative test case 03 of ac_register_launch_privilege()
118 static void utc_ApplicationFW_ac_register_launch_privilege_func_04(void)
121 r = ac_register_launch_privilege(NULL, NULL);
122 if (r != AC_R_EINVAL) {
124 ("ac_register_launch_privilege()"
125 " failed in negative test case");
126 tet_result(TET_FAIL);
129 tet_result(TET_PASS);