From: Kibum Kim Date: Mon, 27 Feb 2012 04:32:06 +0000 (+0900) Subject: tizen beta release X-Git-Tag: 2.0_alpha~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=194f3f35a1af4c37e592458a8f9fb86d7966b7db;p=platform%2Fcore%2Fappfw%2Fapp-svc.git tizen beta release --- diff --git a/TC/build.sh b/TC/build.sh new file mode 100755 index 0000000..e7a9432 --- /dev/null +++ b/TC/build.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +export TET_INSTALL_PATH=$HOME/git/tetware/TETware # local tetware path +export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target +export PATH=$TET_TARGET_PATH/bin:$PATH +export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH +export TET_ROOT=$TET_TARGET_PATH + +export TET_SUITE_ROOT=`pwd` +FILE_NAME_EXTENSION=`date +%s` + +RESULT_DIR=results +HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html +JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal + +mkdir -p $RESULT_DIR + +tcc -c -p ./ +tcc -b -j $JOURNAL_RESULT -p ./ +grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/execute.sh b/TC/execute.sh new file mode 100755 index 0000000..a119011 --- /dev/null +++ b/TC/execute.sh @@ -0,0 +1,19 @@ +#!/bin/sh +export TET_INSTALL_PATH=/mnt/nfs/git/tetware/TETware +export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target +export PATH=$TET_TARGET_PATH/bin:$PATH +export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH + +export TET_ROOT=$TET_TARGET_PATH + +export TET_SUITE_ROOT=`pwd` +FILE_NAME_EXTENSION=`date +%s` + +RESULT_DIR=results +HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html +JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal + +mkdir -p $RESULT_DIR + +tcc -e -j $JOURNAL_RESULT -p ./ +grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/tet_code b/TC/tet_code new file mode 100755 index 0000000..a2cf6c1 --- /dev/null +++ b/TC/tet_code @@ -0,0 +1,12 @@ +# TET reserved codes +0 "PASS" +1 "FAIL" +2 "UNRESOLVED" +3 "NOTINUSE" +4 "UNSUPPORTED" +5 "UNTESTED" +6 "UNINITIATED" +7 "NORESULT" + +# Test suite additional codes +33 "INSPECT" diff --git a/TC/tet_scen b/TC/tet_scen new file mode 100755 index 0000000..43cbc9b --- /dev/null +++ b/TC/tet_scen @@ -0,0 +1,7 @@ +all + ^TEST +##### Scenarios for TEST ##### + +# Test scenario +TEST + :include:/unit/tslist diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg new file mode 100755 index 0000000..f85c948 --- /dev/null +++ b/TC/tetbuild.cfg @@ -0,0 +1,4 @@ +TET_OUTPUT_CAPTURE=False +TET_BUILD_TOOL=make +TET_PASS_TC_NAME=True +TET_API_COMPLIANT=False diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg new file mode 100755 index 0000000..c66eda4 --- /dev/null +++ b/TC/tetclean.cfg @@ -0,0 +1,2 @@ +TET_OUTPUT_CAPTURE=False +TET_CLEAN_TOOL=make clean diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg new file mode 100755 index 0000000..0d9d39a --- /dev/null +++ b/TC/tetexec.cfg @@ -0,0 +1 @@ +TET_OUTPUT_CAPTURE=False diff --git a/TC/unit/Makefile b/TC/unit/Makefile new file mode 100755 index 0000000..37cfa2e --- /dev/null +++ b/TC/unit/Makefile @@ -0,0 +1,41 @@ +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 new file mode 100755 index 0000000..54f482d --- /dev/null +++ b/TC/unit/tc_gen.sh @@ -0,0 +1,28 @@ +#!/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 new file mode 100755 index 0000000..a3d835d --- /dev/null +++ b/TC/unit/tslist @@ -0,0 +1,20 @@ +/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 new file mode 100644 index 0000000..d08e117 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_add_data_array_func.c @@ -0,0 +1,145 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..488b6f5 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_add_data_func.c @@ -0,0 +1,139 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..27f54dd --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_create_result_bundle_func.c @@ -0,0 +1,178 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..ac3c6ed --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_data_is_array_func.c @@ -0,0 +1,158 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..b9aca50 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_data_array_func.c @@ -0,0 +1,159 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..51fcdb4 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_data_func.c @@ -0,0 +1,148 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..d10c2f8 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_list_func.c @@ -0,0 +1,150 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..f228414 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_mime_func.c @@ -0,0 +1,117 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..b67b8ae --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_operation_func.c @@ -0,0 +1,118 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..f61925c --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_pkgname_func.c @@ -0,0 +1,117 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..40567d6 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_get_uri_func.c @@ -0,0 +1,119 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..b67734c --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_is_defapp_func.c @@ -0,0 +1,120 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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("slp.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 new file mode 100644 index 0000000..9db2f37 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_run_service_func.c @@ -0,0 +1,187 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..7ad2c34 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_send_result_func.c @@ -0,0 +1,222 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..d7117c2 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_set_defapp_func.c @@ -0,0 +1,95 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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("slp.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("slp.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 new file mode 100644 index 0000000..f88912e --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_set_mime_func.c @@ -0,0 +1,132 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..ee3008f --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_set_operation_func.c @@ -0,0 +1,130 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..e4d8387 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_set_pkgname_func.c @@ -0,0 +1,130 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100644 index 0000000..4adc1ae --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_set_uri_func.c @@ -0,0 +1,131 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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 new file mode 100755 index 0000000..a95f5f7 --- /dev/null +++ b/TC/unit/utc_ApplicationFW_appsvc_unset_defapp_func.c @@ -0,0 +1,102 @@ +/* + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 +#include +#include +#include + +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("slp.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 new file mode 100644 index 0000000..9630027 --- /dev/null +++ b/TC/unit/utc_MODULE_API_func.c.in @@ -0,0 +1,65 @@ +#include + +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); +} diff --git a/debian/changelog b/debian/changelog index 39995a7..7dede2f 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +app-svc (0.1.18-3) unstable; urgency=low + + * Updated Code + * Git: pkgs/a/app-svc + * Tag: app-svc_0.1.18-3 + + -- Sewook Park Sat, 25 Feb 2012 17:35:51 +0900 + app-svc (0.1.18-2) unstable; urgency=low * Initial release diff --git a/test/appsvc_test.c b/test/appsvc_test.c index 5e80f73..bad6c65 100755 --- a/test/appsvc_test.c +++ b/test/appsvc_test.c @@ -1,19 +1,23 @@ /* -Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved -PROPRIETARY/CONFIDENTIAL -This software is the confidential and proprietary information of -SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that -this software is owned by Samsung and you -shall not disclose such Confidential Information and shall -use it only in accordance with the terms of the license agreement -you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no -representations or warranties about the suitability -of the software, either express or implied, including but not -limited to the implied warranties of merchantability, fitness for -a particular purpose, or non-infringement. -SAMSUNG shall not be liable for any damages suffered by licensee arising out of or -related to this software. -*/ + * app-svc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: Jayoun Lee , Sewook Park , Jaeho Lee + * + * 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 #include