summaryrefslogtreecommitdiff
path: root/TC/unit
diff options
context:
space:
mode:
Diffstat (limited to 'TC/unit')
-rwxr-xr-xTC/unit/Makefile41
-rwxr-xr-xTC/unit/tc_gen.sh28
-rwxr-xr-xTC/unit/tslist20
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_add_data_array_func.c145
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_add_data_func.c139
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_create_result_bundle_func.c178
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_data_is_array_func.c158
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_data_array_func.c159
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_data_func.c148
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_list_func.c150
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_mime_func.c117
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_operation_func.c118
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_pkgname_func.c117
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_get_uri_func.c119
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_is_defapp_func.c120
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_run_service_func.c187
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_send_result_func.c222
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_set_defapp_func.c95
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_set_mime_func.c132
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_set_operation_func.c130
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_set_pkgname_func.c130
-rw-r--r--TC/unit/utc_ApplicationFW_appsvc_set_uri_func.c131
-rwxr-xr-xTC/unit/utc_ApplicationFW_appsvc_unset_defapp_func.c102
-rw-r--r--TC/unit/utc_MODULE_API_func.c.in65
24 files changed, 0 insertions, 2951 deletions
diff --git a/TC/unit/Makefile b/TC/unit/Makefile
deleted file mode 100755
index 37cfa2e..0000000
--- a/TC/unit/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-CC ?= gcc
-
-TARGETS = utc_ApplicationFW_appsvc_set_operation_func \
- utc_ApplicationFW_appsvc_set_uri_func \
- utc_ApplicationFW_appsvc_set_mime_func \
- utc_ApplicationFW_appsvc_add_data_func \
- utc_ApplicationFW_appsvc_add_data_array_func \
- utc_ApplicationFW_appsvc_set_pkgname_func \
- utc_ApplicationFW_appsvc_run_service_func \
- utc_ApplicationFW_appsvc_get_list_func \
- utc_ApplicationFW_appsvc_get_operation_func \
- utc_ApplicationFW_appsvc_get_mime_func \
- utc_ApplicationFW_appsvc_get_uri_func \
- utc_ApplicationFW_appsvc_get_pkgname_func \
- utc_ApplicationFW_appsvc_is_defapp_func \
- utc_ApplicationFW_appsvc_data_is_array_func \
- utc_ApplicationFW_appsvc_set_defapp_func \
- utc_ApplicationFW_appsvc_unset_defapp_func \
- utc_ApplicationFW_appsvc_get_data_func \
- utc_ApplicationFW_appsvc_get_data_array_func \
- utc_ApplicationFW_appsvc_create_result_bundle_func \
- utc_ApplicationFW_appsvc_send_result_func
-
-PKGS = bundle appsvc
-
-LDFLAGS = `pkg-config --libs $(PKGS)`
-LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
-
-CFLAGS = -I. `pkg-config --cflags $(PKGS)`
-CFLAGS += -I$(TET_ROOT)/inc/tet3
-CFLAGS += -Wall
-
-all: $(TARGETS)
-
-$(TARGETS): %: %.c
- $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
-
-clean:
- rm -f $(TARGETS)
diff --git a/TC/unit/tc_gen.sh b/TC/unit/tc_gen.sh
deleted file mode 100755
index 54f482d..0000000
--- a/TC/unit/tc_gen.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-TMPSTR=$0
-SCRIPT=${TMPSTR##*/}
-
-if [ $# -lt 2 ]; then
- echo "Usage) $SCRIPT module_name api_name"
- exit 1
-fi
-
-MODULE=$1
-API=$2
-TEMPLATE=utc_MODULE_API_func.c.in
-TESTCASE=utc_${MODULE}_${API}_func
-
-sed -e '
- s^@API@^'"$API"'^g
- s^@MODULE@^'"$MODULE"'^g
- ' $TEMPLATE > $TESTCASE.c
-
-if [ ! -e "$TESTCASE.c" ]; then
- echo "Failed"
- exit 1
-fi
-echo "Testcase file is $TESTCASE.c"
-echo "Done"
-echo "please put \"$TESTCASE\" as Target in Makefile"
-echo "please put \"/unit/$TESTCASE\" in tslist"
diff --git a/TC/unit/tslist b/TC/unit/tslist
deleted file mode 100755
index a3d835d..0000000
--- a/TC/unit/tslist
+++ /dev/null
@@ -1,20 +0,0 @@
-/unit/utc_ApplicationFW_appsvc_set_operation_func
-/unit/utc_ApplicationFW_appsvc_set_uri_func
-/unit/utc_ApplicationFW_appsvc_set_mime_func
-/unit/utc_ApplicationFW_appsvc_add_data_func
-/unit/utc_ApplicationFW_appsvc_add_data_array_func
-/unit/utc_ApplicationFW_appsvc_set_pkgname_func
-/unit/utc_ApplicationFW_appsvc_run_service_func
-/unit/utc_ApplicationFW_appsvc_get_list_func
-/unit/utc_ApplicationFW_appsvc_get_operation_func
-/unit/utc_ApplicationFW_appsvc_get_mime_func
-/unit/utc_ApplicationFW_appsvc_get_uri_func
-/unit/utc_ApplicationFW_appsvc_get_pkgname_func
-/unit/utc_ApplicationFW_appsvc_is_defapp_func
-/unit/utc_ApplicationFW_appsvc_data_is_array_func
-/unit/utc_ApplicationFW_appsvc_set_defapp_func
-/unit/utc_ApplicationFW_appsvc_unset_defapp_func
-/unit/utc_ApplicationFW_appsvc_get_data_func
-/unit/utc_ApplicationFW_appsvc_get_data_array_func
-/unit/utc_ApplicationFW_appsvc_create_result_bundle_func
-/unit/utc_ApplicationFW_appsvc_send_result_func
diff --git a/TC/unit/utc_ApplicationFW_appsvc_add_data_array_func.c b/TC/unit/utc_ApplicationFW_appsvc_add_data_array_func.c
deleted file mode 100644
index d08e117..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_add_data_array_func.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_add_data_array_func_01(void);
-static void utc_appsvc_add_data_array_func_02(void);
-static void utc_appsvc_add_data_array_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_add_data_array_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_add_data_array_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_add_data_array_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_add_data_array start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_add_data_array ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_add_data_array()
- */
-static void utc_appsvc_add_data_array_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- const char *images[] = { "/opt/media/a.jpg",
- "/opt/media/b.jpg", "/opt/media/c.jpg"
- };
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_add_data_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_add_data_array()
- */
-static void utc_appsvc_add_data_array_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- const char *images[] = { "/opt/media/a.jpg",
- "/opt/media/b.jpg", "/opt/media/c.jpg"
- };
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, NULL, images, 3);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_add_data_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_add_data_array()
- */
-static void utc_appsvc_add_data_array_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, NULL, 3);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_add_data_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_add_data_func.c b/TC/unit/utc_ApplicationFW_appsvc_add_data_func.c
deleted file mode 100644
index 488b6f5..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_add_data_func.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_add_data_func_01(void);
-static void utc_appsvc_add_data_func_02(void);
-static void utc_appsvc_add_data_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_add_data_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_add_data_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_add_data_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_add_data start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_add_data ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_add_data()
- */
-static void utc_appsvc_add_data_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_add_data test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_add_data()
- */
-static void utc_appsvc_add_data_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data(b, NULL, "abcd@samsung.com");
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_add_data test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_add_data()
- */
-static void utc_appsvc_add_data_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data(b, APPSVC_DATA_CC, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_add_data test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_add_data test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_create_result_bundle_func.c b/TC/unit/utc_ApplicationFW_appsvc_create_result_bundle_func.c
deleted file mode 100644
index 27f54dd..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_create_result_bundle_func.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_create_result_bundle_func_01(void);
-static void utc_appsvc_create_result_bundle_func_02(void);
-static void utc_appsvc_create_result_bundle_func_03(void);
-static void utc_appsvc_create_result_bundle_func_04(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_create_result_bundle_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_create_result_bundle_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_create_result_bundle_func_03, NEGATIVE_TC_IDX},
- {utc_appsvc_create_result_bundle_func_04, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_create_result_bundle starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_create_result_bundle ends");
-}
-
-/**
- * @brief Positive test case of appsvc_create_result_bundle()
- */
-static void utc_appsvc_create_result_bundle_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- bundle *outb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "2000");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_create_result_bundle(inb, &outb);
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_create_result_bundle test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_create_result_bundle test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
- if (outb != NULL) {
- bundle_free(outb);
- }
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_create_result_bundle()
- */
-static void utc_appsvc_create_result_bundle_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *outb = NULL;
- ret = appsvc_create_result_bundle(NULL, &outb);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_create_result_bundle test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_create_result_bundle test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- if (outb != NULL) {
- bundle_free(outb);
- }
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_create_result_bundle()
- */
-static void utc_appsvc_create_result_bundle_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- bundle *outb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_create_result_bundle(inb, &outb);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_create_result_bundle test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_create_result_bundle test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
- if (outb != NULL) {
- bundle_free(outb);
- }
-}
-
-/**
- * @brief Negative test case of appsvc_create_result_bundle()
- */
-static void utc_appsvc_create_result_bundle_func_04(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_create_result_bundle(inb, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_create_result_bundle test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_create_result_bundle test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_data_is_array_func.c b/TC/unit/utc_ApplicationFW_appsvc_data_is_array_func.c
deleted file mode 100644
index ac3c6ed..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_data_is_array_func.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_data_is_array_func_01(void);
-static void utc_appsvc_data_is_array_func_02(void);
-static void utc_appsvc_data_is_array_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_data_is_array_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_data_is_array_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_data_is_array_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_uri start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_uri ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_data_is_array()
- */
-static void utc_appsvc_data_is_array_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- const char *images[] = { "/opt/media/a.jpg",
- "/opt/media/b.jpg", "/opt/media/c.jpg"
- };
- bundle *b = NULL;
-
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_data_is_array(b, APPSVC_DATA_SELECTED);
- if (ret == 1) {
- tet_infoline("appsvc_data_is_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_data_is_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
-
-/**
- * @brief Negative test case of appsvc_data_is_array()
- */
-static void utc_appsvc_data_is_array_func_02(void)
-{
- int ret = 0;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_data_is_array(b, APPSVC_DATA_CC);
- if (ret == 0) {
- tet_infoline("appsvc_data_is_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_data_is_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_data_is_array()
- */
-static void utc_appsvc_data_is_array_func_03(void)
-{
- int ret = 0;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_data_is_array(b, APPSVC_DATA_SELECTED);
- if (ret == 0) {
- tet_infoline("appsvc_data_is_array test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_data_is_array test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_data_array_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_data_array_func.c
deleted file mode 100644
index b9aca50..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_data_array_func.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_data_array_func_01(void);
-static void utc_appsvc_get_data_array_func_02(void);
-static void utc_appsvc_get_data_array_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_data_array_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_data_array_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_get_data_array_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_uri start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_uri ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_get_data_array()
- */
-static void utc_appsvc_get_data_array_func_01(void)
-{
- const char **ret_array = NULL;
- const char *images[] = { "/opt/media/a.jpg",
- "/opt/media/b.jpg", "/opt/media/c.jpg"
- };
- bundle *b = NULL;
- int len = 0;
- int ret = APPSVC_RET_OK;
-
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_array = appsvc_get_data_array(b, APPSVC_DATA_SELECTED, &len);
- if (ret_array != NULL) {
- tet_infoline("appsvc_get_data_array test PASS!");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data_array test FAIL!");
- tet_printf("ret_array = NULL");
- tet_result(TET_FAIL);
- }
-
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_data_array()
- */
-static void utc_appsvc_get_data_array_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- const char **ret_array = NULL;
- const char *images[] = { "/opt/media/a.jpg",
- "/opt/media/b.jpg", "/opt/media/c.jpg"
- };
- bundle *b = NULL;
- int len = 0;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_array = appsvc_get_data_array(b, NULL, &len);
- if (ret_array == NULL) {
- tet_infoline("appsvc_get_data_array test PASS!");
- tet_printf("ret_array = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data_array test FAIL!");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_data_array()
- */
-static void utc_appsvc_get_data_array_func_03(void)
-{
- const char **ret_array = NULL;
- int len = 0;
-
- ret_array = appsvc_get_data_array(NULL, NULL, &len);
- if (ret_array == NULL) {
- tet_infoline("appsvc_get_data_array test PASS!");
- tet_printf("ret_array = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data_array test FAIL!");
- tet_result(TET_FAIL);
- }
-
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_data_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_data_func.c
deleted file mode 100644
index 51fcdb4..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_data_func.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_data_func_01(void);
-static void utc_appsvc_get_data_func_02(void);
-static void utc_appsvc_get_data_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_data_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_data_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_get_data_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_uri start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_uri ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_get_data()
- */
-static void utc_appsvc_get_data_func_01(void)
-{
- const char *ret_data = NULL;
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_data = appsvc_get_data(b, APPSVC_DATA_CC);
- if (ret_data != NULL) {
- tet_infoline("appsvc_get_data test PASS!");
- tet_printf("ret = %s", ret_data);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data test FAIL!");
- tet_printf("ret = NULL");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_data()
- */
-static void utc_appsvc_get_data_func_02(void)
-{
- const char *ret_data = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_data = appsvc_get_data(b, APPSVC_DATA_CC);
- if (ret_data == NULL) {
- tet_infoline("appsvc_get_data test PASS!");
- tet_printf("ret = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data test FAIL!");
- tet_printf("ret = %s", ret_data);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_data()
- */
-static void utc_appsvc_get_data_func_03(void)
-{
- const char *ret_data = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_data = appsvc_get_data(NULL, APPSVC_DATA_CC);
- if (ret_data == NULL) {
- tet_infoline("appsvc_get_data test PASS!");
- tet_printf("ret_data = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_data test FAIL!");
- tet_printf("ret_data = %s", ret_data);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_list_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_list_func.c
deleted file mode 100644
index d10c2f8..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_list_func.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_list_func_01(void);
-static void utc_appsvc_get_list_func_02(void);
-static void utc_appsvc_get_list_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_list_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_list_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_get_list_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_get_list starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_get_list ends");
-}
-
-static void iter_function(const char *pkg_name, void *data)
-{
- tet_printf("Pkg name is %s", pkg_name);
- return;
-}
-
-/**
- * @brief Positive test case of appsvc_get_list()
- */
-static void utc_appsvc_get_list_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, APPSVC_OPERATION_PICK);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_get_list(b, (void *)iter_function, NULL);
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_get_list test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_list test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_list()
- */
-static void utc_appsvc_get_list_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, APPSVC_OPERATION_DEFAULT);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_get_list(b, (void *)iter_function, NULL);
- if (ret == APPSVC_RET_ENOMATCH) {
- tet_infoline("appsvc_get_list test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_list test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_list()
- */
-static void utc_appsvc_get_list_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_get_list(NULL, NULL, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_get_list test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_list test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_mime_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_mime_func.c
deleted file mode 100644
index f228414..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_mime_func.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_mime_func_01(void);
-static void utc_appsvc_get_mime_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_mime_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_mime_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_get_mime starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_get_mime ends");
-}
-
-/**
- * @brief Positive test case of appsvc_get_mime()
- */
-static void utc_appsvc_get_mime_func_01(void)
-{
- const char *ret_mime = NULL;
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_mime(b, "image/jpg");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_mime = appsvc_get_mime(b);
- if (ret_mime != NULL) {
- tet_infoline("appsvc_get_mime test PASS!");
- tet_printf("ret = %s", ret_mime);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_mime test FAIL!");
- tet_printf("ret_mime = NULL");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_mime()
- */
-static void utc_appsvc_get_mime_func_02(void)
-{
- const char *ret_mime = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_mime = appsvc_get_mime(b);
- if (ret_mime == NULL) {
- tet_infoline("appsvc_get_mime test PASS!");
- tet_printf("ret_mime = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_mime test FAIL!");
- tet_printf("ret = %s", ret_mime);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_operation_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_operation_func.c
deleted file mode 100644
index b67b8ae..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_operation_func.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_operation_func_01(void);
-static void utc_appsvc_get_operation_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_operation_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_operation_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_get_operation starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_get_operation ends");
-}
-
-/**
- * @brief Positive test case of appsvc_get_operation()
- */
-static void utc_appsvc_get_operation_func_01(void)
-{
- const char *ret_operation = NULL;
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_operation = appsvc_get_operation(b);
- if (ret_operation != NULL) { /*TODO: check content */
- tet_infoline("appsvc_get_operation test PASS!");
- tet_printf("ret = %s", ret_operation);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_operation test FAIL!");
- tet_printf("ret is NULL");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_operation()
- */
-static void utc_appsvc_get_operation_func_02(void)
-{
- const char *ret_operation = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_operation = appsvc_get_operation(b);
- if (ret_operation == NULL) {
- tet_infoline("appsvc_get_operation test PASS!");
- tet_printf("ret is NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_operation test FAIL!");
- tet_printf("ret = %s", ret_operation);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_pkgname_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_pkgname_func.c
deleted file mode 100644
index f61925c..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_pkgname_func.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_pkgname_func_01(void);
-static void utc_appsvc_get_pkgname_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_pkgname_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_pkgname_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_get_pkgname starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_get_pkgname ends");
-}
-
-/**
- * @brief Positive test case of appsvc_get_pkgname()
- */
-static void utc_appsvc_get_pkgname_func_01(void)
-{
- const char *ret_pkgname = NULL;
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_pkgname(b, "org.tizen.gallery");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_pkgname = appsvc_get_pkgname(b);
- if (ret_pkgname != NULL) {
- tet_infoline("appsvc_get_pkgname test PASS!");
- tet_printf("ret = %s", ret_pkgname);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_pkgname test FAIL!");
- tet_printf("ret = NULL");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_pkgname()
- */
-static void utc_appsvc_get_pkgname_func_02(void)
-{
- const char *ret_pkgname = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_pkgname = appsvc_get_pkgname(b);
- if (ret_pkgname == NULL) {
- tet_infoline("appsvc_get_pkgname test PASS!");
- tet_printf("ret_pkgname = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_pkgname test FAIL!");
- tet_printf("ret_pkgname = %s", ret_pkgname);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_get_uri_func.c b/TC/unit/utc_ApplicationFW_appsvc_get_uri_func.c
deleted file mode 100644
index 40567d6..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_get_uri_func.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_get_uri_func_01(void);
-static void utc_appsvc_get_uri_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_get_uri_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_get_uri_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_get_uri start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_get_uri ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_get_uri()
- */
-static void utc_appsvc_get_uri_func_01(void)
-{
- const char *ret_uri = NULL;
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_uri(b, "http://www.samsung.com");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret_uri = appsvc_get_uri(b);
- if (ret_uri != NULL) {
- tet_infoline("appsvc_get_uri test PASS!");
- tet_printf("ret_uri = %s", ret_uri);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_uri test FAIL!");
- tet_printf("ret_uri = NULL");
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_get_uri()
- */
-static void utc_appsvc_get_uri_func_02(void)
-{
- const char *ret_uri = NULL;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret_uri = appsvc_get_uri(b);
- if (ret_uri == NULL) {
- tet_infoline("appsvc_get_uri test PASS!");
- tet_printf("ret = NULL");
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_get_uri test FAIL!");
- tet_printf("ret_uri = %s", ret_uri);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_is_defapp_func.c b/TC/unit/utc_ApplicationFW_appsvc_is_defapp_func.c
deleted file mode 100644
index edf2674..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_is_defapp_func.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_is_defapp_func_01(void);
-static void utc_appsvc_is_defapp_func_02(void);
-static void utc_appsvc_is_defapp_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_is_defapp_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_is_defapp_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_is_defapp_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_is_defapp starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_is_defapp ends");
-}
-
-/**
- * @brief Positive test case of appsvc_is_defapp()
- */
-static void utc_appsvc_is_defapp_func_01(void)
-{
- int ret = 0;
- ret =
- appsvc_set_defapp("http://tizen.org/appsvc/operation/abcd123", NULL, NULL,
- "org.tizen.abcd123");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_is_defapp("org.tizen.abcd123");
- if (ret == 1) {
- tet_infoline("appsvc_is_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_is_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- appsvc_unset_defapp("org.tizen.abcd123");
-}
-
-/**
- * @brief Negative test case of appsvc_is_defapp()
- */
-static void utc_appsvc_is_defapp_func_02(void)
-{
- int ret = 0;
- ret = appsvc_is_defapp("org.tizen.abcdefgh");
- if (ret == 0) {
- tet_infoline("appsvc_is_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_is_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
-
-/**
- * @brief Negative test case of appsvc_is_defapp()
- */
-static void utc_appsvc_is_defapp_func_03(void)
-{
- int ret = 0;
- ret = appsvc_is_defapp(NULL);
- if (ret == 0) {
- tet_infoline("appsvc_is_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_is_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_run_service_func.c b/TC/unit/utc_ApplicationFW_appsvc_run_service_func.c
deleted file mode 100644
index 9db2f37..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_run_service_func.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_run_service_func_01(void);
-static void utc_appsvc_run_service_func_02(void);
-static void utc_appsvc_run_service_func_03(void);
-static void utc_appsvc_run_service_func_04(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_run_service_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_run_service_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_run_service_func_03, NEGATIVE_TC_IDX},
- {utc_appsvc_run_service_func_04, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_run_service starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_run_service ends");
-}
-
-/**
- * @brief Positive test case of appsvc_run_service()
- */
-static void utc_appsvc_run_service_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, APPSVC_OPERATION_PICK);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_mime(b, "image/jpg");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
- if (ret > APPSVC_RET_OK) { /*Return value is pid of the application */
- tet_infoline("appsvc_run_service test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_run_service test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_run_service()
- */
-static void utc_appsvc_run_service_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_run_service(NULL, 0, NULL, (void *)NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("1appsvc_run_service test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("1appsvc_run_service test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_run_service()
- */
-static void utc_appsvc_run_service_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_mime(b, "abcdefgh");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
- if (ret == APPSVC_RET_ENOMATCH) {
- tet_infoline("appsvc_run_service test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_run_service test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_run_service()
- */
-static void utc_appsvc_run_service_func_04(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_pkgname(b, "\0");
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(b);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
- if (ret == APPSVC_RET_ELAUNCH) {
- tet_infoline("appsvc_run_service test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_run_service test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_send_result_func.c b/TC/unit/utc_ApplicationFW_appsvc_send_result_func.c
deleted file mode 100644
index 7ad2c34..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_send_result_func.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_send_result_func_01(void);
-static void utc_appsvc_send_result_func_02(void);
-static void utc_appsvc_send_result_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_send_result_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_send_result_func_02, POSITIVE_TC_IDX},
- {utc_appsvc_send_result_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_send_result starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_send_result ends");
-}
-
-/**
- * @brief Positive test case of appsvc_send_result()
- */
-static void utc_appsvc_send_result_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- bundle *outb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_create_result_bundle(inb, &outb);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- if (outb) {
- bundle_free(outb);
- }
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(outb, "result", "1");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- bundle_free(outb);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_send_result(outb, 0);
-
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_send_result test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_send_result test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
- bundle_free(outb);
-}
-
-/**
- * @brief Positive test case of appsvc_send_result()
- */
-static void utc_appsvc_send_result_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- bundle *outb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_create_result_bundle(inb, &outb);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- if (outb) {
- bundle_free(outb);
- }
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = bundle_add(outb, "result", "1");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- bundle_free(outb);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_send_result(outb, -1);
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_send_result test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_send_result test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
- bundle_free(outb);
-}
-
-/**
- * @brief Negative test case of appsvc_send_result()
- */
-static void utc_appsvc_send_result_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *inb = NULL;
- bundle *outb = NULL;
- inb = bundle_create();
- if (inb == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_create_result_bundle(inb, &outb);
- if (ret != APPSVC_RET_OK) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- if (outb) {
- bundle_free(outb);
- }
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = bundle_add(outb, "result", "1");
- if (ret != 0) {
- tet_infoline("Test initialization failed!!!");
- bundle_free(inb);
- bundle_free(outb);
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_send_result(outb, -2);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_send_result test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_send_result test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(inb);
- bundle_free(outb);
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_set_defapp_func.c b/TC/unit/utc_ApplicationFW_appsvc_set_defapp_func.c
deleted file mode 100644
index 46921e1..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_set_defapp_func.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_set_defapp_func_01(void);
-static void utc_appsvc_set_defapp_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_set_defapp_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_set_defapp_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_defapp starts");
- appsvc_unset_defapp("org.tizen.abcd");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_defapp ends");
- appsvc_unset_defapp("org.tizen.abcd12");
-}
-
-/**
- * @brief Positive test case of appsvc_set_defapp()
- */
-static void utc_appsvc_set_defapp_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- ret =
- appsvc_set_defapp("http://tizen.org/appsvc/operation/abcd12", NULL, NULL,
- "org.tizen.abcd12");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_set_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
-
-/**
- * @brief Negative test case of appsvc_set_defapp()
- */
-static void utc_appsvc_set_defapp_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_set_defapp("http://tizen.org/appsvc/operation/abcd", NULL, NULL, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_set_mime_func.c b/TC/unit/utc_ApplicationFW_appsvc_set_mime_func.c
deleted file mode 100644
index f88912e..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_set_mime_func.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_set_mime_func_01(void);
-static void utc_appsvc_set_mime_func_02(void);
-static void utc_appsvc_set_mime_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_set_mime_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_set_mime_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_set_mime_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_mime starts");
- return;
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_mime ends");
- return;
-}
-
-/**
- * @brief Positive test case of appsvc_set_mime()
- */
-static void utc_appsvc_set_mime_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_mime(b, "image/jpg");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_set_mime test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_mime test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_mime()
- */
-static void utc_appsvc_set_mime_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_mime(b, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_mime test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_mime test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_mime()
- */
-static void utc_appsvc_set_mime_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_set_mime(NULL, "image/jpg");
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_mime test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_mime test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_set_operation_func.c b/TC/unit/utc_ApplicationFW_appsvc_set_operation_func.c
deleted file mode 100644
index ee3008f..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_set_operation_func.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_set_operation_func_01(void);
-static void utc_appsvc_set_operation_func_02(void);
-static void utc_appsvc_set_operation_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_set_operation_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_set_operation_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_set_operation_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_operation starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_operation ends");
-}
-
-/**
- * @brief Positive test case of appsvc_set_operation()
- */
-static void utc_appsvc_set_operation_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_set_operation test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_operation test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_operation()
- */
-static void utc_appsvc_set_operation_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_operation(b, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_operation test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_operation test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_operation()
- */
-static void utc_appsvc_set_operation_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_set_operation(NULL, APPSVC_OPERATION_VIEW);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_operation test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_operation test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_set_pkgname_func.c b/TC/unit/utc_ApplicationFW_appsvc_set_pkgname_func.c
deleted file mode 100644
index e4d8387..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_set_pkgname_func.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_set_pkgname_func_01(void);
-static void utc_appsvc_set_pkgname_func_02(void);
-static void utc_appsvc_set_pkgname_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_set_pkgname_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_set_pkgname_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_set_pkgname_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_pkgname starts");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_pkgname ends");
-}
-
-/**
- * @brief Positive test case of appsvc_set_pkgname()
- */
-static void utc_appsvc_set_pkgname_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_pkgname(b, "org.tizen.test");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_set_pkgname test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_pkgname test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_pkgname()
- */
-static void utc_appsvc_set_pkgname_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_pkgname(b, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_pkgname test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_pkgname test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_pkgname()
- */
-static void utc_appsvc_set_pkgname_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_set_pkgname(NULL, "org.tizen.test");
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_pkgname test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_pkgname test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_set_uri_func.c b/TC/unit/utc_ApplicationFW_appsvc_set_uri_func.c
deleted file mode 100644
index 4adc1ae..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_set_uri_func.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_set_uri_func_01(void);
-static void utc_appsvc_set_uri_func_02(void);
-static void utc_appsvc_set_uri_func_03(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_set_uri_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_set_uri_func_02, NEGATIVE_TC_IDX},
- {utc_appsvc_set_uri_func_03, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_set_uri start");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_set_uri ends ");
-
-}
-
-/**
- * @brief Positive test case of appsvc_set_uri()
- */
-static void utc_appsvc_set_uri_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_uri(b, "http://www.samsung.com");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_set_uri test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_uri test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_uri()
- */
-static void utc_appsvc_set_uri_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- bundle *b = NULL;
- b = bundle_create();
- if (b == NULL) {
- tet_infoline("Test initialization failed!!!");
- tet_result(TET_UNINITIATED);
- return;
- }
- ret = appsvc_set_uri(b, NULL);
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_uri test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_uri test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- bundle_free(b);
- return;
-}
-
-/**
- * @brief Negative test case of appsvc_set_uri()
- */
-static void utc_appsvc_set_uri_func_03(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_set_uri(NULL, "http://www.samsung.com");
- if (ret == APPSVC_RET_EINVAL) {
- tet_infoline("appsvc_set_uri test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_set_uri test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
- return;
-}
diff --git a/TC/unit/utc_ApplicationFW_appsvc_unset_defapp_func.c b/TC/unit/utc_ApplicationFW_appsvc_unset_defapp_func.c
deleted file mode 100755
index 6e20043..0000000
--- a/TC/unit/utc_ApplicationFW_appsvc_unset_defapp_func.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * app-svc
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <tet_api.h>
-#include <appsvc.h>
-#include <bundle.h>
-#include <unistd.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup) (void) = startup;
-void (*tet_cleanup) (void) = cleanup;
-
-static void utc_appsvc_unset_defapp_func_01(void);
-static void utc_appsvc_unset_defapp_func_02(void);
-
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- {utc_appsvc_unset_defapp_func_01, POSITIVE_TC_IDX},
- {utc_appsvc_unset_defapp_func_02, NEGATIVE_TC_IDX},
- {NULL, 0}
-};
-
-static void startup(void)
-{
- tet_infoline("Testing API appsvc_unset_defapp starts");
- appsvc_unset_defapp("org.tizen.xyz");
-}
-
-static void cleanup(void)
-{
- tet_infoline("Testing API appsvc_unset_defapp ends");
- appsvc_unset_defapp("org.tizen.xyz");
-}
-
-/**
- * @brief Positive test case of appsvc_unset_defapp()
- */
-static void utc_appsvc_unset_defapp_func_01(void)
-{
- int ret = APPSVC_RET_OK;
- ret =
- appsvc_set_defapp("http://tizen.org/appsvc/operation/xyz", NULL, NULL,
- "org.tizen.xyz");
- if (ret != APPSVC_RET_OK) {
- tet_result(TET_UNINITIATED);
- return;
- }
-
- ret = appsvc_unset_defapp("org.tizen.xyz");
- if (ret == APPSVC_RET_OK) {
- tet_infoline("appsvc_unset_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_unset_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
-
-/**
- * @brief Negative test case of appsvc_unset_defapp()
- */
-static void utc_appsvc_unset_defapp_func_02(void)
-{
- int ret = APPSVC_RET_OK;
- ret = appsvc_unset_defapp(NULL);
- if (ret < 0) {
- tet_infoline("appsvc_unset_defapp test PASS!");
- tet_printf("ret = %d", ret);
- tet_result(TET_PASS);
- } else {
- tet_infoline("appsvc_unset_defapp test FAIL!");
- tet_printf("ret = %d", ret);
- tet_result(TET_FAIL);
- }
-}
diff --git a/TC/unit/utc_MODULE_API_func.c.in b/TC/unit/utc_MODULE_API_func.c.in
deleted file mode 100644
index 9630027..0000000
--- a/TC/unit/utc_MODULE_API_func.c.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <tet_api.h>
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup)(void) = startup;
-void (*tet_cleanup)(void) = cleanup;
-
-static void utc_@MODULE@_@API@_func_01(void);
-static void utc_@MODULE@_@API@_func_02(void);
-
-enum {
- POSITIVE_TC_IDX = 0x01,
- NEGATIVE_TC_IDX,
-};
-
-struct tet_testlist tet_testlist[] = {
- { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
- { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX },
- { NULL, 0 }
-};
-
-static void startup(void)
-{
-}
-
-static void cleanup(void)
-{
-}
-
-/**
- * @brief Positive test case of @API@()
- */
-static void utc_@MODULE@_@API@_func_01(void)
-{
- int r = 0;
-
-/*
- r = @API@(...);
-*/
- if (r) {
- tet_infoline("@API@() failed in positive test case");
- tet_result(TET_FAIL);
- return;
- }
- tet_result(TET_PASS);
-}
-
-/**
- * @brief Negative test case of ug_init @API@()
- */
-static void utc_@MODULE@_@API@_func_02(void)
-{
- int r = 0;
-
-/*
- r = @API@(...);
-*/
- if (r) {
- tet_infoline("@API@() failed in negative test case");
- tet_result(TET_FAIL);
- return;
- }
- tet_result(TET_PASS);
-}