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 <pkgmgr-info.h>
25 static void startup(void);
26 static void cleanup(void);
28 void (*tet_startup) (void) = startup;
29 void (*tet_cleanup) (void) = cleanup;
31 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_01(void);
32 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_02(void);
33 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_03(void);
37 POSITIVE_TC_IDX = 0x01,
41 struct tet_testlist tet_testlist[] = {
42 {utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_01, POSITIVE_TC_IDX},
43 {utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_02, NEGATIVE_TC_IDX},
44 {utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_03, NEGATIVE_TC_IDX},
48 static void startup(void)
52 static void cleanup(void)
57 * @brief Positive test case of pkgmgrinfo_appinfo_filter_add_bool()
59 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_01(void)
62 pkgmgrinfo_appinfo_filter_h handle;
63 r = pkgmgrinfo_appinfo_filter_create(&handle);
64 if (r != PMINFO_R_OK) {
65 tet_result(TET_UNINITIATED);
68 r = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_NODISPLAY, 1);
69 if (r != PMINFO_R_OK) {
71 ("pkgmgrinfo_appinfo_filter_add_bool() failed in positive test case");
72 pkgmgrinfo_appinfo_filter_destroy(handle);
76 pkgmgrinfo_appinfo_filter_destroy(handle);
81 * @brief Negative test case of pkgmgrinfo_appinfo_filter_add_bool()
83 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_02(void)
86 r = pkgmgrinfo_appinfo_filter_add_bool(NULL, PMINFO_APPINFO_PROP_APP_NODISPLAY, 1);
87 if (r == PMINFO_R_OK) {
89 ("pkgmgrinfo_appinfo_filter_add_bool() failed in negative test case");
97 * @brief Negative test case of pkgmgrinfo_appinfo_filter_add_bool()
99 static void utc_ApplicationFW_pkgmgrinfo_appinfo_filter_add_bool_func_03(void)
102 pkgmgrinfo_appinfo_filter_h handle;
103 r = pkgmgrinfo_appinfo_filter_create(&handle);
104 if (r != PMINFO_R_OK) {
105 tet_result(TET_UNINITIATED);
108 r = pkgmgrinfo_appinfo_filter_add_bool(handle, NULL, 1);
109 if (r == PMINFO_R_OK) {
111 ("pkgmgrinfo_appinfo_filter_add_bool() failed in negative test case");
112 tet_result(TET_FAIL);
113 pkgmgrinfo_appinfo_filter_destroy(handle);
116 pkgmgrinfo_appinfo_filter_destroy(handle);
117 tet_result(TET_PASS);