From: sungwon2.han Date: Wed, 2 Mar 2016 04:36:55 +0000 (+0900) Subject: Delete TC files X-Git-Tag: submit/tizen_mobile/20160309.011627~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F60745%2F2;p=platform%2Fframework%2Fweb%2Fbrowser-provider.git Delete TC files TC files are managed in other package separately. Change-Id: I5bea75f69215e68bd198260b097d5ee0666ffd40 --- diff --git a/TC/web_bookmark/_export_env.sh b/TC/web_bookmark/_export_env.sh deleted file mode 100755 index 7a317f8..0000000 --- a/TC/web_bookmark/_export_env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -source ./config - -export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware target path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path -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 diff --git a/TC/web_bookmark/_export_target_env.sh b/TC/web_bookmark/_export_target_env.sh deleted file mode 100755 index 3fd8e3f..0000000 --- a/TC/web_bookmark/_export_target_env.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -. ./config - -export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator -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 diff --git a/TC/web_bookmark/build.sh b/TC/web_bookmark/build.sh deleted file mode 100755 index 72aad6c..0000000 --- a/TC/web_bookmark/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_bookmark/clean.sh b/TC/web_bookmark/clean.sh deleted file mode 100755 index 29743e0..0000000 --- a/TC/web_bookmark/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -RESULT_DIR=results - -tcc -c -p ./ # executing tcc, with clean option (-c) -rm -r $RESULT_DIR -rm -r tet_tmp_dir -rm testcase/tet_captured diff --git a/TC/web_bookmark/config b/TC/web_bookmark/config deleted file mode 100644 index 81719b9..0000000 --- a/TC/web_bookmark/config +++ /dev/null @@ -1,3 +0,0 @@ -PKG_NAME=capi-web-bookmark -TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/web_bookmark/TETware -TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware diff --git a/TC/web_bookmark/push.sh b/TC/web_bookmark/push.sh deleted file mode 100755 index 5eb9510..0000000 --- a/TC/web_bookmark/push.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. ./config - -TC_PATH=/opt/home/$PKG_NAME - -echo $TC_PATH - -sdb shell "mkdir -p $TC_PATH" - -sdb push . $TC_PATH - - diff --git a/TC/web_bookmark/run.sh b/TC/web_bookmark/run.sh deleted file mode 100755 index cec5778..0000000 --- a/TC/web_bookmark/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -source ./_export_target_env.sh - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_bookmark/test.png b/TC/web_bookmark/test.png deleted file mode 100644 index c5ec238..0000000 Binary files a/TC/web_bookmark/test.png and /dev/null differ diff --git a/TC/web_bookmark/testcase/Makefile b/TC/web_bookmark/testcase/Makefile deleted file mode 100644 index 811d781..0000000 --- a/TC/web_bookmark/testcase/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include ../config - -CC ?= gcc - -C_FILES = $(shell ls *.c) - -PKGS = $(PKG_NAME) -PKGS += glib-2.0 -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 - -TCS := $(shell ls -1 *.c | cut -d. -f1) - -all: $(TCS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TCS) diff --git a/TC/web_bookmark/testcase/tslist b/TC/web_bookmark/testcase/tslist deleted file mode 100755 index df9bc6d..0000000 --- a/TC/web_bookmark/testcase/tslist +++ /dev/null @@ -1,64 +0,0 @@ -/testcase/utc_web_bookmark_create -/testcase/utc_web_bookmark_delete -/testcase/utc_web_bookmark_get_root -/testcase/utc_web_bookmark_set_type -/testcase/utc_web_bookmark_set_parent_id -/testcase/utc_web_bookmark_set_url -/testcase/utc_web_bookmark_set_title -/testcase/utc_web_bookmark_set_sequence -/testcase/utc_web_bookmark_set_access_count -/testcase/utc_web_bookmark_set_date_created -/testcase/utc_web_bookmark_set_date_modified -/testcase/utc_web_bookmark_set_date_visited -/testcase/utc_web_bookmark_set_account_name -/testcase/utc_web_bookmark_set_account_type -/testcase/utc_web_bookmark_set_device_name -/testcase/utc_web_bookmark_set_device_id -/testcase/utc_web_bookmark_set_sync -/testcase/utc_web_bookmark_set_icon -/testcase/utc_web_bookmark_set_snapshot -/testcase/utc_web_bookmark_set_webicon -/testcase/utc_web_bookmark_set_icon_png -/testcase/utc_web_bookmark_set_dirty -/testcase/utc_web_bookmark_get_full_ids_p -/testcase/utc_web_bookmark_get_full_with_deleted_ids_p -/testcase/utc_web_bookmark_get_dirty_ids_p -/testcase/utc_web_bookmark_get_deleted_ids_p -/testcase/utc_web_bookmark_get_type -/testcase/utc_web_bookmark_get_parent_id -/testcase/utc_web_bookmark_get_url -/testcase/utc_web_bookmark_get_title -/testcase/utc_web_bookmark_get_sequence -/testcase/utc_web_bookmark_get_is_editable -/testcase/utc_web_bookmark_get_is_operator -/testcase/utc_web_bookmark_get_access_count -/testcase/utc_web_bookmark_get_date_created -/testcase/utc_web_bookmark_get_date_modified -/testcase/utc_web_bookmark_get_date_visited -/testcase/utc_web_bookmark_get_account_name -/testcase/utc_web_bookmark_get_account_type -/testcase/utc_web_bookmark_get_device_name -/testcase/utc_web_bookmark_get_device_id -/testcase/utc_web_bookmark_get_sync -/testcase/utc_web_bookmark_get_icon -/testcase/utc_web_bookmark_get_snapshot -/testcase/utc_web_bookmark_get_webicon -/testcase/utc_web_bookmark_get_icon_png -/testcase/utc_web_bookmark_easy_create -/testcase/utc_web_bookmark_get_easy_all -/testcase/utc_web_bookmark_get_info -/testcase/utc_web_bookmark_get_ids_p -/testcase/utc_web_bookmark_get_retrieved_ids_p -/testcase/utc_web_bookmark_get_cond_ids_p -/testcase/utc_web_bookmark_get_timestamp_ids_p -/testcase/utc_web_bookmark_get_raw_retrieved_ids_p -/testcase/utc_web_bookmark_data_changed_cb -/testcase/utc_web_bookmark_publish_notification -/testcase/utc_web_bookmark_clear_dirty_ids_p -/testcase/utc_web_bookmark_clear_deleted_ids_p -/testcase/utc_web_bookmark_get_errorcode -/testcase/utc_web_bookmark_easy_free -/testcase/utc_web_bookmark_backup -/testcase/utc_web_bookmark_restore -/testcase/utc_web_bookmark_backup_all -/testcase/utc_web_bookmark_reset diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_backup.c b/TC/web_bookmark/testcase/utc_web_bookmark_backup.c deleted file mode 100644 index ee078b6..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_backup.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_backup_n(void); -static void utc_web_bookmark_backup_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_backup_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_backup_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_backup() - */ -static void utc_web_bookmark_backup_n(void) -{ - int ret = bp_bookmark_adaptor_backup(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_backup() - */ -static void utc_web_bookmark_backup_p(void) -{ - int ret = bp_bookmark_adaptor_backup(INTERNET_BOOKMARK_BACKUP_FILE_NAME); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_backup failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_backup_all.c b/TC/web_bookmark/testcase/utc_web_bookmark_backup_all.c deleted file mode 100644 index 64899a6..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_backup_all.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_backup_all_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_backup_all_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_backup_all() - */ -static void utc_web_bookmark_backup_all_p(void) -{ - char *path = bp_bookmark_adaptor_backup_all(); - free(path); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_clear_deleted_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_clear_deleted_ids_p.c deleted file mode 100644 index 9d919c0..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_clear_deleted_ids_p.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_clear_deleted_ids_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_clear_deleted_ids_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_clear_deleted_ids() - */ -static void utc_web_bookmark_clear_deleted_ids_p(void) -{ - bp_bookmark_adaptor_deinitialize(); - int ret = bp_bookmark_adaptor_clear_deleted_ids(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_clear_deleted_ids failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_clear_dirty_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_clear_dirty_ids_p.c deleted file mode 100644 index b420a80..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_clear_dirty_ids_p.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_clear_dirty_ids_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_clear_dirty_ids_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_clear_dirty_ids() - */ -static void utc_web_bookmark_clear_dirty_ids_p(void) -{ - int ret = bp_bookmark_adaptor_clear_dirty_ids(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_clear_dirty_ids failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_create.c b/TC/web_bookmark/testcase/utc_web_bookmark_create.c deleted file mode 100644 index 6586ca6..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_create.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_create_n(void); -static void utc_web_bookmark_create_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_create_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_create_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_create() - */ -static void utc_web_bookmark_create_n(void) -{ - int ret = bp_bookmark_adaptor_create(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_create() - */ -static void utc_web_bookmark_create_p(void) -{ - int id = -1; - int ret = bp_bookmark_adaptor_create(&id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_create failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_data_changed_cb.c b/TC/web_bookmark/testcase/utc_web_bookmark_data_changed_cb.c deleted file mode 100644 index 0ccd568..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_data_changed_cb.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_data_changed_cb_n(void); -static void utc_web_bookmark_set_data_changed_cb_p(void); -static void utc_web_bookmark_unset_data_changed_cb_n(void); -static void utc_web_bookmark_unset_data_changed_cb_p(void); -static void utc_web_bookmark_is_setted_data_changed_cb_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_data_changed_cb_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_data_changed_cb_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_is_setted_data_changed_cb_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_unset_data_changed_cb_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_unset_data_changed_cb_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Callback function - */ -void bookmark_changed(void* user_data) -{ -} - - - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_data_changed_cb() - */ -static void utc_web_bookmark_set_data_changed_cb_n(void) -{ - int ret = bp_bookmark_adaptor_set_data_changed_cb(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_data_changed_cb() - */ -static void utc_web_bookmark_set_data_changed_cb_p(void) -{ - int ret = bp_bookmark_adaptor_set_data_changed_cb(bookmark_changed, NULL); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_root failed"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_unset_data_changed_cb() - */ -static void utc_web_bookmark_unset_data_changed_cb_n(void) -{ - int ret = bp_bookmark_adaptor_unset_data_changed_cb(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_errorcode() - */ -static void utc_web_bookmark_unset_data_changed_cb_p(void) -{ - int ret = bp_bookmark_adaptor_unset_data_changed_cb(bookmark_changed); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_unset_data_changed_cb failed"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_is_setted_data_changed_cb() - */ -static void utc_web_bookmark_is_setted_data_changed_cb_p(void) -{ - int ret = bp_bookmark_adaptor_is_setted_data_changed_cb(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_is_setted_data_changed_cb failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_delete.c b/TC/web_bookmark/testcase/utc_web_bookmark_delete.c deleted file mode 100644 index bed7347..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_delete.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_delete_n(void); -static void utc_web_bookmark_delete_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_delete_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_delete_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_delete() - */ -static void utc_web_bookmark_delete_n(void) -{ - int ret = bp_bookmark_adaptor_delete(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_delete() - */ -static void utc_web_bookmark_delete_p(void) -{ - int id = -1; - int ret = bp_bookmark_adaptor_create(&id); - if (ret == 0) - ret = bp_bookmark_adaptor_delete(id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_create failed"); -} - diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_easy_create.c b/TC/web_bookmark/testcase/utc_web_bookmark_easy_create.c deleted file mode 100644 index b340f3a..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_easy_create.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_easy_create_n(void); -static void utc_web_bookmark_easy_create_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_easy_create_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_easy_create_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_easy_create() - */ -static void utc_web_bookmark_easy_create_n(void) -{ - int ret = bp_bookmark_adaptor_easy_create(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_easy_create() - */ -static void utc_web_bookmark_easy_create_p(void) -{ - int root_id = 0; - bp_bookmark_adaptor_get_root(&root_id); - bp_bookmark_info_fmt info; - memset(&info, 0x00, sizeof(bp_bookmark_info_fmt)); - info.url = "URL"; - info.title = "TITLE"; - info.type = 0; - info.parent = root_id; - info.sequence = 5; - int id = -1; - int ret = bp_bookmark_adaptor_easy_create(&id, &info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_easy_create failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_easy_free.c b/TC/web_bookmark/testcase/utc_web_bookmark_easy_free.c deleted file mode 100644 index 5ebe4b3..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_easy_free.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_easy_free_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_easy_free_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_easy_free() - */ -static void utc_web_bookmark_easy_free_p(void) -{ - bp_bookmark_adaptor_easy_free(NULL); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_access_count.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_access_count.c deleted file mode 100644 index c98cd34..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_access_count.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_access_count_n(void); -static void utc_web_bookmark_get_access_count_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_access_count_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_access_count_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_access_count() - */ -static void utc_web_bookmark_get_access_count_n(void) -{ - int ret = bp_bookmark_adaptor_get_access_count(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_access_count() - */ -static void utc_web_bookmark_get_access_count_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_access_count(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_access_count failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_account_name.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_account_name.c deleted file mode 100644 index 7c9f421..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_account_name.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_account_name_n(void); -static void utc_web_bookmark_get_account_name_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_account_name_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_account_name_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_account_name() - */ -static void utc_web_bookmark_get_account_name_n(void) -{ - int ret = bp_bookmark_adaptor_get_account_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_account_name() - */ -static void utc_web_bookmark_get_account_name_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_account_name(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_account_name failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_account_type.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_account_type.c deleted file mode 100644 index d11ba88..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_account_type.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_account_type_n(void); -static void utc_web_bookmark_get_account_type_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_account_type_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_account_type_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_account_type() - */ -static void utc_web_bookmark_get_account_type_n(void) -{ - int ret = bp_bookmark_adaptor_get_account_type(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_account_type() - */ -static void utc_web_bookmark_get_account_type_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_account_type(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_account_type failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_cond_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_cond_ids_p.c deleted file mode 100644 index 5b4e7c0..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_cond_ids_p.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_cond_ids_p_n(void); -static void utc_web_bookmark_get_cond_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_cond_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_cond_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_cond_ids_p() - */ -static void utc_web_bookmark_get_cond_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_cond_ids_p(NULL, NULL, NULL, NULL, - 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_cond_ids_p() - */ -static void utc_web_bookmark_get_cond_ids_p_p(void) -{ - bp_bookmark_property_cond_fmt properties; - bp_bookmark_rows_cond_fmt conds; - memset(&properties, 0x00, sizeof(bp_bookmark_property_cond_fmt)); - memset(&conds, 0x00, sizeof(bp_bookmark_rows_cond_fmt)); - properties.parent = -1; - properties.type = 0; - properties.is_operator = 0; - properties.is_editable = -1; - conds.limit = -1; - conds.offset = 0; - conds.order_offset = BP_BOOKMARK_O_SEQUENCE; - conds.ordering = 0; - conds.period_offset = BP_BOOKMARK_O_DATE_CREATED; - conds.period_type = BP_BOOKMARK_DATE_ALL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_cond_ids_p(&ids, &ids_count, - &properties, &conds, BP_BOOKMARK_O_TITLE, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_cond_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_created.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_date_created.c deleted file mode 100644 index 77faecf..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_created.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_date_created_n(void); -static void utc_web_bookmark_get_date_created_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_date_created_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_date_created() - */ -static void utc_web_bookmark_get_date_created_n(void) -{ - int ret = bp_bookmark_adaptor_get_date_created(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_date_created() - */ -static void utc_web_bookmark_get_date_created_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_date_created(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_date_created failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_modified.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_date_modified.c deleted file mode 100644 index 303be53..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_modified.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_date_modified_n(void); -static void utc_web_bookmark_get_date_modified_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_date_modified_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_date_modified() - */ -static void utc_web_bookmark_get_date_modified_n(void) -{ - int ret = bp_bookmark_adaptor_get_date_modified(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_date_modified() - */ -static void utc_web_bookmark_get_date_modified_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_date_modified(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_date_modified failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_visited.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_date_visited.c deleted file mode 100644 index aac4e88..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_date_visited.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_date_visited_n(void); -static void utc_web_bookmark_get_date_visited_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_date_visited_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_date_visited_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_date_visited() - */ -static void utc_web_bookmark_get_date_visited_n(void) -{ - int ret = bp_bookmark_adaptor_get_date_visited(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_date_visited() - */ -static void utc_web_bookmark_get_date_visited_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_date_visited(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_date_visited failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_deleted_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_deleted_ids_p.c deleted file mode 100644 index 19dd8b1..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_deleted_ids_p.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_deleted_ids_p_n(void); -static void utc_web_bookmark_get_deleted_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_deleted_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_deleted_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_deleted_ids_p() - */ -static void utc_web_bookmark_get_deleted_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_deleted_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_deleted_ids_p() - */ -static void utc_web_bookmark_get_deleted_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_deleted_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_deleted_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_device_id.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_device_id.c deleted file mode 100644 index 29d3ff2..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_device_id.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_device_id_n(void); -static void utc_web_bookmark_get_device_id_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_device_id_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_device_id_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_device_id() - */ -static void utc_web_bookmark_get_device_id_n(void) -{ - int ret = bp_bookmark_adaptor_get_device_id(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_device_id() - */ -static void utc_web_bookmark_get_device_id_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_device_id(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_device_id failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_device_name.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_device_name.c deleted file mode 100644 index a2325a3..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_device_name.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_device_name_n(void); -static void utc_web_bookmark_get_device_name_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_device_name_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_device_name_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_device_name() - */ -static void utc_web_bookmark_get_device_name_n(void) -{ - int ret = bp_bookmark_adaptor_get_device_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_device_name() - */ -static void utc_web_bookmark_get_device_name_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_device_name(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_device_name failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_dirty_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_dirty_ids_p.c deleted file mode 100644 index 8d989ee..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_dirty_ids_p.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_dirty_ids_p_n(void); -static void utc_web_bookmark_get_dirty_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_dirty_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_dirty_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_dirty_ids_p() - */ -static void utc_web_bookmark_get_dirty_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_dirty_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_dirty_ids_p() - */ -static void utc_web_bookmark_get_dirty_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_dirty_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_dirty_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_easy_all.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_easy_all.c deleted file mode 100644 index 65a3046..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_easy_all.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_easy_all_n(void); -static void utc_web_bookmark_get_easy_all_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_easy_all_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_easy_all_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_easy_all() - */ -static void utc_web_bookmark_get_easy_all_n(void) -{ - int ret = bp_bookmark_adaptor_get_easy_all(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_easy_all() - */ -static void utc_web_bookmark_get_easy_all_p(void) -{ - bp_bookmark_info_fmt info; - memset(&info, 0x00, sizeof(bp_bookmark_info_fmt)); - int ret = bp_bookmark_adaptor_get_easy_all(g_testcase_id, &info); - bp_bookmark_adaptor_easy_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_easy_all failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_errorcode.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_errorcode.c deleted file mode 100644 index 96bc94c..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_errorcode.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_errorcode_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_errorcode_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_errorcode() - */ -static void utc_web_bookmark_get_errorcode_p(void) -{ - bp_bookmark_adaptor_get_errorcode(); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_full_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_full_ids_p.c deleted file mode 100644 index e3c5e51..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_full_ids_p.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_full_ids_p_n(void); -static void utc_web_bookmark_get_full_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_full_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_full_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_full_ids_p() - */ -static void utc_web_bookmark_get_full_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_full_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_full_ids_p() - */ -static void utc_web_bookmark_get_full_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_full_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_full_ids_p failed"); -} - diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_full_with_deleted_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_full_with_deleted_ids_p.c deleted file mode 100644 index 9869f2c..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_full_with_deleted_ids_p.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_full_with_deleted_ids_p_n(void); -static void utc_web_bookmark_get_full_with_deleted_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_full_with_deleted_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_full_with_deleted_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_full_with_deleted_ids_p() - */ -static void utc_web_bookmark_get_full_with_deleted_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_full_with_deleted_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_full_with_deleted_ids_p() - */ -static void utc_web_bookmark_get_full_with_deleted_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_full_with_deleted_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_full_with_deleted_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_icon.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_icon.c deleted file mode 100644 index 27cb0ae..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_icon.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_icon_n(void); -static void utc_web_bookmark_get_icon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_icon_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_icon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_icon() - */ -static void utc_web_bookmark_get_icon_n(void) -{ - int ret = bp_bookmark_adaptor_get_icon(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_icon() - */ -static void utc_web_bookmark_get_icon_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_get_icon(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_snapshot failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_icon_png.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_icon_png.c deleted file mode 100644 index 3bbc7ea..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_icon_png.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_icon_png_n(void); -static void utc_web_bookmark_get_icon_png_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_icon_png_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_icon_png_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_icon_png() - */ -static void utc_web_bookmark_get_icon_png_n(void) -{ - int ret = bp_bookmark_adaptor_get_icon_png(-1, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_icon_png() - */ -static void utc_web_bookmark_get_icon_png_p(void) -{ - int length = 0; - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_get_icon_png(g_testcase_id, &value, - &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "utc_web_bookmark_get_icon_png_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_ids_p.c deleted file mode 100644 index 20f7812..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_ids_p.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_ids_p_n(void); -static void utc_web_bookmark_get_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_ids_p() - */ -static void utc_web_bookmark_get_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_ids_p(NULL, NULL, -1, 0, -1, -1, - -1, -1, BP_BOOKMARK_O_SEQUENCE, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_ids_p() - */ -static void utc_web_bookmark_get_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_ids_p(&ids, &ids_count, -1, 0, - -1, -1, -1, -1, BP_BOOKMARK_O_SEQUENCE, 0); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_info.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_info.c deleted file mode 100644 index 742098f..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_info.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_info_n(void); -static void utc_web_bookmark_get_info_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_info_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_info_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_info() - */ -static void utc_web_bookmark_get_info_n(void) -{ - int ret = bp_bookmark_adaptor_get_info(-1, 0, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_info() - */ -static void utc_web_bookmark_get_info_p(void) -{ - unsigned int b_offset = (BP_BOOKMARK_O_TYPE | BP_BOOKMARK_O_PARENT | BP_BOOKMARK_O_SEQUENCE | BP_BOOKMARK_O_DATE_CREATED | BP_BOOKMARK_O_DATE_MODIFIED | BP_BOOKMARK_O_DATE_VISITED | BP_BOOKMARK_O_URL | BP_BOOKMARK_O_TITLE); - bp_bookmark_info_fmt info; - memset(&info, 0x00, sizeof(bp_bookmark_info_fmt)); - int ret = bp_bookmark_adaptor_get_info(g_testcase_id, b_offset, &info); - bp_bookmark_adaptor_easy_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_info failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_is_editable.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_is_editable.c deleted file mode 100644 index cad3dd2..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_is_editable.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_is_editable_n(void); -static void utc_web_bookmark_get_is_editable_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_is_editable_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_is_editable_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_is_editable() - */ -static void utc_web_bookmark_get_is_editable_n(void) -{ - int ret = bp_bookmark_adaptor_get_is_editable(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_is_editable() - */ -static void utc_web_bookmark_get_is_editable_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_is_editable(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_is_editable failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_is_operator.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_is_operator.c deleted file mode 100644 index a88fba2..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_is_operator.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_is_operator_n(void); -static void utc_web_bookmark_get_is_operator_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_is_operator_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_is_operator_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_is_operator() - */ -static void utc_web_bookmark_get_is_operator_n(void) -{ - int ret = bp_bookmark_adaptor_get_is_operator(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_is_operator() - */ -static void utc_web_bookmark_get_is_operator_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_is_operator(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_is_operator failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_parent_id.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_parent_id.c deleted file mode 100644 index e117806..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_parent_id.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_parent_id_n(void); -static void utc_web_bookmark_get_parent_id_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_parent_id_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_parent_id_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_parent_id() - */ -static void utc_web_bookmark_get_parent_id_n(void) -{ - int ret = bp_bookmark_adaptor_get_parent_id(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_parent_id() - */ -static void utc_web_bookmark_get_parent_id_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_parent_id(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_parent_id failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_raw_retrieved_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_raw_retrieved_ids_p.c deleted file mode 100644 index a3aa4ba..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_raw_retrieved_ids_p.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_raw_retrieved_ids_p_n(void); -static void utc_web_bookmark_get_raw_retrieved_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_raw_retrieved_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_raw_retrieved_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_raw_retrieved_ids_p() - */ -static void utc_web_bookmark_get_raw_retrieved_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_raw_retrieved_ids_p(NULL, NULL, NULL, NULL, - 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_raw_retrieved_ids_p() - */ -static void utc_web_bookmark_get_raw_retrieved_ids_p_p(void) -{ - bp_bookmark_property_cond_fmt properties; - bp_bookmark_rows_cond_fmt conds; - memset(&properties, 0x00, sizeof(bp_bookmark_property_cond_fmt)); - memset(&conds, 0x00, sizeof(bp_bookmark_rows_cond_fmt)); - properties.parent = -1; - properties.type = 0; - properties.is_operator = 0; - properties.is_editable = -1; - conds.limit = -1; - conds.offset = 0; - conds.order_offset = BP_BOOKMARK_O_SEQUENCE; - conds.ordering = 0; - conds.period_offset = BP_BOOKMARK_O_DATE_CREATED; - conds.period_type = BP_BOOKMARK_DATE_ALL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_raw_retrieved_ids_p(&ids, &ids_count, - &properties, &conds, BP_BOOKMARK_O_URL, "%U%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_raw_retrieved_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_retrieved_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_retrieved_ids_p.c deleted file mode 100644 index 14f3e7f..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_retrieved_ids_p.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_retrieved_ids_p_n(void); -static void utc_web_bookmark_get_retrieved_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_retrieved_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_retrieved_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_retrieved_ids_p() - */ -static void utc_web_bookmark_get_retrieved_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_retrieved_ids_p(NULL, NULL, -1, 0, -1, -1, - -1, -1, BP_BOOKMARK_O_SEQUENCE, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_retrieved_ids_p() - */ -static void utc_web_bookmark_get_retrieved_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_retrieved_ids_p(&ids, &ids_count, -1, 0, - -1, -1, -1, -1, BP_BOOKMARK_O_SEQUENCE, 0, BP_BOOKMARK_O_TITLE, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_retrieved_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_root.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_root.c deleted file mode 100644 index 0704466..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_root.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_root_n(void); -static void utc_web_bookmark_get_root_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_root_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_root_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_root() - */ -static void utc_web_bookmark_get_root_n(void) -{ - int ret = bp_bookmark_adaptor_get_root(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_root() - */ -static void utc_web_bookmark_get_root_p(void) -{ - int root_id = -1; - int ret = bp_bookmark_adaptor_get_root(&root_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_root failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_sequence.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_sequence.c deleted file mode 100644 index 8aace45..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_sequence.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_sequence_n(void); -static void utc_web_bookmark_get_sequence_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_sequence_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_sequence_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_sequence() - */ -static void utc_web_bookmark_get_sequence_n(void) -{ - int ret = bp_bookmark_adaptor_get_sequence(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_sequence() - */ -static void utc_web_bookmark_get_sequence_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_sequence(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_sequence failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_snapshot.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_snapshot.c deleted file mode 100644 index 31b039f..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_snapshot.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_snapshot_n(void); -static void utc_web_bookmark_get_snapshot_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_snapshot_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_snapshot() - */ -static void utc_web_bookmark_get_snapshot_n(void) -{ - int ret = bp_bookmark_adaptor_get_snapshot(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_snapshot() - */ -static void utc_web_bookmark_get_snapshot_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_get_snapshot(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_snapshot failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_sync.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_sync.c deleted file mode 100644 index 26ec4c1..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_sync.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_sync_n(void); -static void utc_web_bookmark_get_sync_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_sync_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_sync_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_sync() - */ -static void utc_web_bookmark_get_sync_n(void) -{ - int ret = bp_bookmark_adaptor_get_sync(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_sync() - */ -static void utc_web_bookmark_get_sync_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_sync(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_sync failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_timestamp_ids_p.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_timestamp_ids_p.c deleted file mode 100644 index 478f95d..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_timestamp_ids_p.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_timestamp_ids_p_n(void); -static void utc_web_bookmark_get_timestamp_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_timestamp_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_timestamp_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_timestamp_ids_p() - */ -static void utc_web_bookmark_get_timestamp_ids_p_n(void) -{ - int ret = bp_bookmark_adaptor_get_timestamp_ids_p(NULL, NULL, NULL, - NULL, NULL, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_timestamp_ids_p() - */ -static void utc_web_bookmark_get_timestamp_ids_p_p(void) -{ - bp_bookmark_rows_fmt limits; - bp_bookmark_property_cond_fmt properties; - memset(&properties, 0x00, sizeof(bp_bookmark_property_cond_fmt)); - memset(&limits, 0x00, sizeof(bp_bookmark_rows_fmt)); - properties.parent = -1; - properties.type = 0; - properties.is_operator = 0; - properties.is_editable = -1; - limits.limit = -1; - limits.offset = 0; - limits.order_offset = BP_BOOKMARK_O_SEQUENCE; - limits.ordering = 0; - - int times_count = 2; - - bp_bookmark_timestamp_fmt timestamps[times_count]; - timestamps[0].offset = BP_BOOKMARK_O_DATE_CREATED; - timestamps[0].timestamp = (int)time(NULL) - 6000; - timestamps[0].cmp_operator = BP_BOOKMARK_OP_GREATER_QUEAL; - timestamps[1].conds_operator = 0; - timestamps[1].offset = BP_BOOKMARK_O_DATE_CREATED; - timestamps[1].timestamp = (int)time(NULL); - timestamps[1].cmp_operator = BP_BOOKMARK_OP_LESS_QUEAL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_bookmark_adaptor_get_timestamp_ids_p(&ids, &ids_count, - &properties, &limits, timestamps, times_count, - BP_BOOKMARK_O_TITLE, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_timestamp_ids_p failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_title.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_title.c deleted file mode 100644 index bba25eb..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_title.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_title_n(void); -static void utc_web_bookmark_get_title_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_title_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_title_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_title() - */ -static void utc_web_bookmark_get_title_n(void) -{ - int ret = bp_bookmark_adaptor_get_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_title() - */ -static void utc_web_bookmark_get_title_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_title(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_title failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_type.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_type.c deleted file mode 100644 index 76baf77..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_type.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_type_n(void); -static void utc_web_bookmark_get_type_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_type_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_type_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_type() - */ -static void utc_web_bookmark_get_type_n(void) -{ - int ret = bp_bookmark_adaptor_get_type(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_type() - */ -static void utc_web_bookmark_get_type_p(void) -{ - int value = -1; - int ret = bp_bookmark_adaptor_get_type(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_type failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_url.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_url.c deleted file mode 100644 index 0e2853b..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_url.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_url_n(void); -static void utc_web_bookmark_get_url_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_url_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_url_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_url() - */ -static void utc_web_bookmark_get_url_n(void) -{ - int ret = bp_bookmark_adaptor_get_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_url() - */ -static void utc_web_bookmark_get_url_p(void) -{ - char *value = NULL; - int ret = bp_bookmark_adaptor_get_url(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_url failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_get_webicon.c b/TC/web_bookmark/testcase/utc_web_bookmark_get_webicon.c deleted file mode 100644 index 0b5a0bd..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_get_webicon.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_get_webicon_n(void); -static void utc_web_bookmark_get_webicon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_get_webicon_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_get_webicon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_get_webicon() - */ -static void utc_web_bookmark_get_webicon_n(void) -{ - int ret = bp_bookmark_adaptor_get_webicon(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_get_webicon() - */ -static void utc_web_bookmark_get_webicon_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_get_webicon(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_get_webicon failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_publish_notification.c b/TC/web_bookmark/testcase/utc_web_bookmark_publish_notification.c deleted file mode 100644 index 8133a15..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_publish_notification.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_publish_notification_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_publish_notification_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_publish_notification() - */ -static void utc_web_bookmark_publish_notification_p(void) -{ - int ret = bp_bookmark_adaptor_publish_notification(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_publish_notification failed"); -} - diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_reset.c b/TC/web_bookmark/testcase/utc_web_bookmark_reset.c deleted file mode 100644 index 67c0376..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_reset.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_reset_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_reset_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_reset() - */ -static void utc_web_bookmark_reset_p(void) -{ - bp_bookmark_adaptor_reset(); - dts_pass(__FUNCTION__); -} - diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_restore.c b/TC/web_bookmark/testcase/utc_web_bookmark_restore.c deleted file mode 100644 index f8c8d56..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_restore.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_restore_n(void); -static void utc_web_bookmark_restore_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_restore_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_restore_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_restore() - */ -static void utc_web_bookmark_restore_n(void) -{ - int ret = bp_bookmark_adaptor_restore(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_restore() - */ -static void utc_web_bookmark_restore_p(void) -{ - int ret = bp_bookmark_adaptor_backup(INTERNET_BOOKMARK_BACKUP_FILE_NAME); - if (ret == 0) - ret = bp_bookmark_adaptor_restore(INTERNET_BOOKMARK_BACKUP_FILE_NAME); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_restore failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_access_count.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_access_count.c deleted file mode 100644 index c9cdb16..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_access_count.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_access_count_n(void); -static void utc_web_bookmark_set_access_count_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_access_count_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_access_count_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_access_count() - */ -static void utc_web_bookmark_set_access_count_n(void) -{ - int ret = bp_bookmark_adaptor_set_access_count(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_access_count() - */ -static void utc_web_bookmark_set_access_count_p(void) -{ - int ret = bp_bookmark_adaptor_set_access_count(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_access_count failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_account_name.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_account_name.c deleted file mode 100644 index 5454c06..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_account_name.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_account_name_n(void); -static void utc_web_bookmark_set_account_name_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_account_name_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_account_name_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_account_name() - */ -static void utc_web_bookmark_set_account_name_n(void) -{ - int ret = bp_bookmark_adaptor_set_account_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_account_name() - */ -static void utc_web_bookmark_set_account_name_p(void) -{ - int ret = bp_bookmark_adaptor_set_account_name(g_testcase_id, "ACCOUNT_NAME"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_account_name failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_account_type.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_account_type.c deleted file mode 100644 index af52f9d..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_account_type.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_account_type_n(void); -static void utc_web_bookmark_set_account_type_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_account_type_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_account_type_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_account_type() - */ -static void utc_web_bookmark_set_account_type_n(void) -{ - int ret = bp_bookmark_adaptor_set_account_type(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_account_type() - */ -static void utc_web_bookmark_set_account_type_p(void) -{ - int ret = bp_bookmark_adaptor_set_account_type(g_testcase_id, "ACCOUNT_TYPE"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_account_type failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_created.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_date_created.c deleted file mode 100644 index a3c8a91..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_created.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_date_created_n(void); -static void utc_web_bookmark_set_date_created_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_date_created_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_date_created() - */ -static void utc_web_bookmark_set_date_created_n(void) -{ - int ret = bp_bookmark_adaptor_set_date_created(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_date_created() - */ -static void utc_web_bookmark_set_date_created_p(void) -{ - int ret = bp_bookmark_adaptor_set_date_created(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_date_created failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_modified.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_date_modified.c deleted file mode 100644 index f1afa12..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_modified.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_date_modified_n(void); -static void utc_web_bookmark_set_date_modified_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_date_modified_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_date_modified() - */ -static void utc_web_bookmark_set_date_modified_n(void) -{ - int ret = bp_bookmark_adaptor_set_date_modified(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_date_modified() - */ -static void utc_web_bookmark_set_date_modified_p(void) -{ - int ret = bp_bookmark_adaptor_set_date_modified(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_date_modified failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_visited.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_date_visited.c deleted file mode 100644 index 6cd5c7b..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_date_visited.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_date_visited_n(void); -static void utc_web_bookmark_set_date_visited_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_date_visited_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_date_visited_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_date_visited() - */ -static void utc_web_bookmark_set_date_visited_n(void) -{ - int ret = bp_bookmark_adaptor_set_date_visited(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_date_visited() - */ -static void utc_web_bookmark_set_date_visited_p(void) -{ - int ret = bp_bookmark_adaptor_set_date_visited(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_date_visited failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_device_id.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_device_id.c deleted file mode 100644 index 206e60b..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_device_id.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_device_id_n(void); -static void utc_web_bookmark_set_device_id_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_device_id_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_device_id_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_device_id() - */ -static void utc_web_bookmark_set_device_id_n(void) -{ - int ret = bp_bookmark_adaptor_set_device_id(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_device_id() - */ -static void utc_web_bookmark_set_device_id_p(void) -{ - int ret = bp_bookmark_adaptor_set_device_id(g_testcase_id, "DEVICE_ID"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_device_id failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_device_name.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_device_name.c deleted file mode 100644 index e8a004d..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_device_name.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_device_name_n(void); -static void utc_web_bookmark_set_device_name_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_device_name_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_device_name_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_device_name() - */ -static void utc_web_bookmark_set_device_name_n(void) -{ - int ret = bp_bookmark_adaptor_set_device_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_device_name() - */ -static void utc_web_bookmark_set_device_name_p(void) -{ - int ret = bp_bookmark_adaptor_set_device_name(g_testcase_id, "DEVICE_NAME"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_device_name failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_dirty.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_dirty.c deleted file mode 100644 index e527f4e..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_dirty.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_dirty_n(void); -static void utc_web_bookmark_set_dirty_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_dirty_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_dirty_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_dirty() - */ -static void utc_web_bookmark_set_dirty_n(void) -{ - int ret = bp_bookmark_adaptor_set_dirty(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_dirty() - */ -static void utc_web_bookmark_set_dirty_p(void) -{ - int ret = bp_bookmark_adaptor_set_dirty(g_testcase_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_dirty failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_icon.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_icon.c deleted file mode 100644 index 09b341c..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_icon.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_icon_n(void); -static void utc_web_bookmark_set_icon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_icon_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_icon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_icon() - */ -static void utc_web_bookmark_set_icon_n(void) -{ - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_set_icon(-1, 0, 0, &value, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_icon() - */ -static void utc_web_bookmark_set_icon_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_bookmark_adaptor_set_icon(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_icon failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_icon_png.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_icon_png.c deleted file mode 100644 index b731678..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_icon_png.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 - -#include -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_icon_png_n(void); -static void utc_web_bookmark_set_icon_png_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_icon_png_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_icon_png_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_icon_png() - */ -static void utc_web_bookmark_set_icon_png_n(void) -{ - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_set_icon_png(-1, &value); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_icon_png() - */ -static void utc_web_bookmark_set_icon_png_p(void) -{ - int ret = -1; - FILE *fp = fopen("/home/capi-web-bookmark/test.png", "rb"); - if (fp != NULL) { - int length = 0; - unsigned char buffer[3145728]; - length = fread(buffer, 1, 3145728, fp); - if (length > 0) { - ret = bp_bookmark_adaptor_set_icon_png(g_testcase_id, buffer); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_icon_png failed"); - } else { - dts_fail(__FUNCTION__, "read %d bytes from png", length); - } - fclose(fp); - } else { - dts_fail(__FUNCTION__, "can not open png:%s", strerror(errno)); - } -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_parent_id.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_parent_id.c deleted file mode 100644 index 9dba333..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_parent_id.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_parent_id_n(void); -static void utc_web_bookmark_set_parent_id_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_parent_id_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_parent_id_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_parent_id() - */ -static void utc_web_bookmark_set_parent_id_n(void) -{ - int ret = bp_bookmark_adaptor_set_parent_id(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_parent_id() - */ -static void utc_web_bookmark_set_parent_id_p(void) -{ - int root_id = -1; - int ret = bp_bookmark_adaptor_get_root(&root_id); - if (ret == 0) - ret = bp_bookmark_adaptor_set_parent_id(g_testcase_id, root_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_parent_id failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_sequence.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_sequence.c deleted file mode 100644 index 65b2b32..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_sequence.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_sequence_n(void); -static void utc_web_bookmark_set_sequence_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_sequence_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_sequence_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_sequence() - */ -static void utc_web_bookmark_set_sequence_n(void) -{ - int ret = bp_bookmark_adaptor_set_sequence(-1, -1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_sequence() - */ -static void utc_web_bookmark_set_sequence_p(void) -{ - int ret = bp_bookmark_adaptor_set_sequence(g_testcase_id, -1); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_sequence failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_snapshot.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_snapshot.c deleted file mode 100644 index 27a7e8c..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_snapshot.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_snapshot_n(void); -static void utc_web_bookmark_set_snapshot_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_snapshot_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_snapshot() - */ -static void utc_web_bookmark_set_snapshot_n(void) -{ - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_set_snapshot(-1, 0, 0, &value, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_snapshot() - */ -static void utc_web_bookmark_set_snapshot_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_bookmark_adaptor_set_snapshot(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_snapshot failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_sync.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_sync.c deleted file mode 100644 index c8c1c74..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_sync.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_sync_n(void); -static void utc_web_bookmark_set_sync_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_sync_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_sync_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_sync() - */ -static void utc_web_bookmark_set_sync_n(void) -{ - int ret = bp_bookmark_adaptor_set_sync(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_sync() - */ -static void utc_web_bookmark_set_sync_p(void) -{ - int ret = bp_bookmark_adaptor_set_sync(g_testcase_id, "SYNC"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_sync failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_title.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_title.c deleted file mode 100644 index 6435cd2..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_title.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_title_n(void); -static void utc_web_bookmark_set_title_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_title_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_title_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_title() - */ -static void utc_web_bookmark_set_title_n(void) -{ - int ret = bp_bookmark_adaptor_set_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_title() - */ -static void utc_web_bookmark_set_title_p(void) -{ - int ret = bp_bookmark_adaptor_set_title(g_testcase_id, "TITLE"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_title failed"); -} - diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_type.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_type.c deleted file mode 100644 index 9cffd60..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_type.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_type_n(void); -static void utc_web_bookmark_set_type_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_type_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_type_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_type() - */ -static void utc_web_bookmark_set_type_n(void) -{ - int ret = bp_bookmark_adaptor_set_type(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_type() - */ -static void utc_web_bookmark_set_type_p(void) -{ - int ret = bp_bookmark_adaptor_set_type(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_type failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_url.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_url.c deleted file mode 100644 index 92dfc93..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_url.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_url_n(void); -static void utc_web_bookmark_set_url_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_url_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_url_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_url() - */ -static void utc_web_bookmark_set_url_n(void) -{ - int ret = bp_bookmark_adaptor_set_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_url() - */ -static void utc_web_bookmark_set_url_p(void) -{ - int ret = bp_bookmark_adaptor_set_url(g_testcase_id, "URL"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_url failed"); -} diff --git a/TC/web_bookmark/testcase/utc_web_bookmark_set_webicon.c b/TC/web_bookmark/testcase/utc_web_bookmark_set_webicon.c deleted file mode 100644 index 06d941d..0000000 --- a/TC/web_bookmark/testcase/utc_web_bookmark_set_webicon.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_set_webicon_n(void); -static void utc_web_bookmark_set_webicon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_set_webicon_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_set_webicon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_bookmark_adaptor_initialize(); - bp_bookmark_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_bookmark_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_bookmark_adaptor_set_webicon() - */ -static void utc_web_bookmark_set_webicon_n(void) -{ - unsigned char *value = NULL; - int ret = bp_bookmark_adaptor_set_webicon(-1, 0, 0, value, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_bookmark_adaptor_set_webicon() - */ -static void utc_web_bookmark_set_webicon_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_bookmark_adaptor_set_webicon(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_bookmark_adaptor_set_webicon failed"); -} diff --git a/TC/web_bookmark/tet_scen b/TC/web_bookmark/tet_scen deleted file mode 100644 index 03f029a..0000000 --- a/TC/web_bookmark/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/testcase/tslist diff --git a/TC/web_bookmark/tetbuild.cfg b/TC/web_bookmark/tetbuild.cfg deleted file mode 100644 index f7eda55..0000000 --- a/TC/web_bookmark/tetbuild.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option for build operation checking -TET_BUILD_TOOL=make # build with using make command -TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build -TET_API_COMPLIANT=True # use TET API in Test Case ? -TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/web_bookmark/tetclean.cfg b/TC/web_bookmark/tetclean.cfg deleted file mode 100644 index 02d7030..0000000 --- a/TC/web_bookmark/tetclean.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option -TET_CLEAN_TOOL= make clean # clean tool -TET_CLEAN_FILE= Makefile # file for clean -TET_API_COMPLIANT=True # TET API useage -TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/web_bookmark/tetexec.cfg b/TC/web_bookmark/tetexec.cfg deleted file mode 100644 index ef3e452..0000000 --- a/TC/web_bookmark/tetexec.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capturing execution or not -TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional -TET_EXEC_FILE= # ex) exectool : execution file/ Optional -TET_API_COMPLIANT=True # Test case or Tool usesTET API? -TET_PASS_TC_NAME=True # showing Passed TC name ? diff --git a/TC/web_bookmark_csc/_export_env.sh b/TC/web_bookmark_csc/_export_env.sh deleted file mode 100755 index 7a317f8..0000000 --- a/TC/web_bookmark_csc/_export_env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -source ./config - -export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware target path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path -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 diff --git a/TC/web_bookmark_csc/_export_target_env.sh b/TC/web_bookmark_csc/_export_target_env.sh deleted file mode 100755 index 3fd8e3f..0000000 --- a/TC/web_bookmark_csc/_export_target_env.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -. ./config - -export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator -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 diff --git a/TC/web_bookmark_csc/build.sh b/TC/web_bookmark_csc/build.sh deleted file mode 100755 index 72aad6c..0000000 --- a/TC/web_bookmark_csc/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_bookmark_csc/clean.sh b/TC/web_bookmark_csc/clean.sh deleted file mode 100755 index 29743e0..0000000 --- a/TC/web_bookmark_csc/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -RESULT_DIR=results - -tcc -c -p ./ # executing tcc, with clean option (-c) -rm -r $RESULT_DIR -rm -r tet_tmp_dir -rm testcase/tet_captured diff --git a/TC/web_bookmark_csc/config b/TC/web_bookmark_csc/config deleted file mode 100644 index 90ef49c..0000000 --- a/TC/web_bookmark_csc/config +++ /dev/null @@ -1,3 +0,0 @@ -PKG_NAME=capi-web-bookmark-csc -TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/web_bookmark_csc/TETware -TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware diff --git a/TC/web_bookmark_csc/push.sh b/TC/web_bookmark_csc/push.sh deleted file mode 100755 index 5eb9510..0000000 --- a/TC/web_bookmark_csc/push.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. ./config - -TC_PATH=/opt/home/$PKG_NAME - -echo $TC_PATH - -sdb shell "mkdir -p $TC_PATH" - -sdb push . $TC_PATH - - diff --git a/TC/web_bookmark_csc/run.sh b/TC/web_bookmark_csc/run.sh deleted file mode 100755 index cec5778..0000000 --- a/TC/web_bookmark_csc/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -source ./_export_target_env.sh - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_bookmark_csc/testcase/Makefile b/TC/web_bookmark_csc/testcase/Makefile deleted file mode 100644 index 811d781..0000000 --- a/TC/web_bookmark_csc/testcase/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include ../config - -CC ?= gcc - -C_FILES = $(shell ls *.c) - -PKGS = $(PKG_NAME) -PKGS += glib-2.0 -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 - -TCS := $(shell ls -1 *.c | cut -d. -f1) - -all: $(TCS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TCS) diff --git a/TC/web_bookmark_csc/testcase/tslist b/TC/web_bookmark_csc/testcase/tslist deleted file mode 100755 index f78a414..0000000 --- a/TC/web_bookmark_csc/testcase/tslist +++ /dev/null @@ -1 +0,0 @@ -/testcase/utc_web_bookmark_csc diff --git a/TC/web_bookmark_csc/testcase/utc_web_bookmark_csc.c b/TC/web_bookmark_csc/testcase/utc_web_bookmark_csc.c deleted file mode 100644 index 215c2f9..0000000 --- a/TC/web_bookmark_csc/testcase/utc_web_bookmark_csc.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_bookmark_csc_get_root_n(void); -static void utc_web_bookmark_csc_get_root_p(void); -static void utc_web_bookmark_csc_create_n(void); -static void utc_web_bookmark_csc_create_p(void); -static void utc_web_bookmark_csc_delete_n(void); -static void utc_web_bookmark_csc_delete_p(void); -static void utc_web_bookmark_csc_get_info_n(void); -static void utc_web_bookmark_csc_get_info_p(void); -static void utc_web_bookmark_csc_get_full_ids_p_n(void); -static void utc_web_bookmark_csc_get_full_ids_p_p(void); -static void utc_web_bookmark_csc_get_ids_p_n(void); -static void utc_web_bookmark_csc_get_ids_p_p(void); -static void utc_web_bookmark_csc_get_duplicated_title_ids_p_n(void); -static void utc_web_bookmark_csc_get_duplicated_title_ids_p_p(void); -static void utc_web_bookmark_csc_get_errorcode_p(void); -static void utc_web_bookmark_csc_free_p(void); -static void utc_web_bookmark_csc_reset_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_bookmark_csc_get_root_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_get_root_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_create_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_create_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_delete_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_delete_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_get_info_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_get_info_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_get_full_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_get_full_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_get_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_get_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_get_duplicated_title_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_bookmark_csc_get_duplicated_title_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_get_errorcode_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_free_p, POSITIVE_TC_IDX }, - { utc_web_bookmark_csc_reset_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bookmark_csc_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bookmark_csc_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bookmark_csc_get_root() - */ -static void utc_web_bookmark_csc_get_root_n(void) -{ - int ret = bookmark_csc_get_root(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_get_root() - */ -static void utc_web_bookmark_csc_get_root_p(void) -{ - int root_id = -1; - int ret = bookmark_csc_get_root(&root_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_get_root failed"); -} - -/** - * @brief Negative test case of bookmark_csc_create() - */ -static void utc_web_bookmark_csc_create_n(void) -{ - int ret = bookmark_csc_create(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_create() - */ -static void utc_web_bookmark_csc_create_p(void) -{ - int root_id = -1; - int ret = bookmark_csc_get_root(&root_id); - bookmark_csc_info_fmt info; - memset(&info, 0x00, sizeof(bookmark_csc_info_fmt)); - info.type = BOOKMARK_CSC_TYPE_BOOKMARK; - info.title = "TITLE"; - info.url = "URL"; - info.parent = root_id; - info.editable = 1; - ret = bookmark_csc_create(&g_testcase_id, &info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_create failed"); -} - -/** - * @brief Negative test case of bookmark_csc_delete() - */ -static void utc_web_bookmark_csc_delete_n(void) -{ - int ret = bookmark_csc_delete(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_delete() - */ -static void utc_web_bookmark_csc_delete_p(void) -{ - int id = -1; - int root_id = -1; - int ret = bookmark_csc_get_root(&root_id); - bookmark_csc_info_fmt info; - memset(&info, 0x00, sizeof(bookmark_csc_info_fmt)); - info.type = BOOKMARK_CSC_TYPE_BOOKMARK; - info.title = "TITLE"; - info.url = "URL"; - info.parent = root_id; - info.editable = 1; - ret = bookmark_csc_create(&id, &info); - if (ret == 0) - ret = bookmark_csc_delete(id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_create failed"); -} - -/** - * @brief Negative test case of bookmark_csc_get_info() - */ -static void utc_web_bookmark_csc_get_info_n(void) -{ - int ret = bookmark_csc_get_info(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_get_info() - */ -static void utc_web_bookmark_csc_get_info_p(void) -{ - bookmark_csc_info_fmt info; - memset(&info, 0x00, sizeof(bookmark_csc_info_fmt)); - int ret = bookmark_csc_get_info(g_testcase_id, &info); - bookmark_csc_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_get_info failed"); -} - -/** - * @brief Negative test case of bookmark_csc_get_duplicated_title_ids_p() - */ -static void utc_web_bookmark_csc_get_duplicated_title_ids_p_n(void) -{ - int ret = bookmark_csc_get_duplicated_title_ids_p(NULL, NULL, 0, 0, - 0, 0, 0, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_get_duplicated_title_ids_p() - */ -static void utc_web_bookmark_csc_get_duplicated_title_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bookmark_csc_get_duplicated_title_ids_p(&ids, &ids_count, - 1, 0, -1, -1, -1, -1, 0/*ASC*/, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_get_duplicated_title_ids_p failed"); -} - -/** - * @brief Negative test case of bookmark_csc_get_full_ids_p() - */ -static void utc_web_bookmark_csc_get_full_ids_p_n(void) -{ - int ret = bookmark_csc_get_full_ids_p(BOOKMARK_CSC_TYPE_BOOKMARK, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_get_full_ids_p() - */ -static void utc_web_bookmark_csc_get_full_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bookmark_csc_get_full_ids_p(BOOKMARK_CSC_TYPE_BOOKMARK, &ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_get_full_ids_p failed"); -} - - -/** - * @brief Negative test case of bookmark_csc_get_ids_p() - */ -static void utc_web_bookmark_csc_get_ids_p_n(void) -{ - int ret = bookmark_csc_get_ids_p(-1, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bookmark_csc_get_ids_p() - */ -static void utc_web_bookmark_csc_get_ids_p_p(void) -{ - int root_id = -1; - int ret = bookmark_csc_get_root(&root_id); - int *ids = NULL; - int ids_count = 0; - ret = bookmark_csc_get_ids_p(root_id, &ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bookmark_csc_get_ids_p failed"); -} - - - -/** - * @brief Positive test case of bookmark_csc_get_errorcode() - */ -static void utc_web_bookmark_csc_get_errorcode_p(void) -{ - bookmark_csc_get_errorcode(); - dts_pass(__FUNCTION__); -} - -/** - * @brief Positive test case of bookmark_csc_free() - */ -static void utc_web_bookmark_csc_free_p(void) -{ - bookmark_csc_free(NULL); - dts_pass(__FUNCTION__); -} - -/** - * @brief Positive test case of bookmark_csc_reset() - */ -static void utc_web_bookmark_csc_reset_p(void) -{ - bookmark_csc_reset(); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_bookmark_csc/tet_scen b/TC/web_bookmark_csc/tet_scen deleted file mode 100644 index 03f029a..0000000 --- a/TC/web_bookmark_csc/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/testcase/tslist diff --git a/TC/web_bookmark_csc/tetbuild.cfg b/TC/web_bookmark_csc/tetbuild.cfg deleted file mode 100644 index f7eda55..0000000 --- a/TC/web_bookmark_csc/tetbuild.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option for build operation checking -TET_BUILD_TOOL=make # build with using make command -TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build -TET_API_COMPLIANT=True # use TET API in Test Case ? -TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/web_bookmark_csc/tetclean.cfg b/TC/web_bookmark_csc/tetclean.cfg deleted file mode 100644 index 02d7030..0000000 --- a/TC/web_bookmark_csc/tetclean.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option -TET_CLEAN_TOOL= make clean # clean tool -TET_CLEAN_FILE= Makefile # file for clean -TET_API_COMPLIANT=True # TET API useage -TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/web_bookmark_csc/tetexec.cfg b/TC/web_bookmark_csc/tetexec.cfg deleted file mode 100644 index ef3e452..0000000 --- a/TC/web_bookmark_csc/tetexec.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capturing execution or not -TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional -TET_EXEC_FILE= # ex) exectool : execution file/ Optional -TET_API_COMPLIANT=True # Test case or Tool usesTET API? -TET_PASS_TC_NAME=True # showing Passed TC name ? diff --git a/TC/web_history/_export_env.sh b/TC/web_history/_export_env.sh deleted file mode 100755 index 7a317f8..0000000 --- a/TC/web_history/_export_env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -source ./config - -export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware target path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path -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 diff --git a/TC/web_history/_export_target_env.sh b/TC/web_history/_export_target_env.sh deleted file mode 100755 index 3fd8e3f..0000000 --- a/TC/web_history/_export_target_env.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -. ./config - -export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator -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 diff --git a/TC/web_history/build.sh b/TC/web_history/build.sh deleted file mode 100755 index 72aad6c..0000000 --- a/TC/web_history/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_history/clean.sh b/TC/web_history/clean.sh deleted file mode 100755 index 29743e0..0000000 --- a/TC/web_history/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -RESULT_DIR=results - -tcc -c -p ./ # executing tcc, with clean option (-c) -rm -r $RESULT_DIR -rm -r tet_tmp_dir -rm testcase/tet_captured diff --git a/TC/web_history/config b/TC/web_history/config deleted file mode 100644 index 1a7be46..0000000 --- a/TC/web_history/config +++ /dev/null @@ -1,3 +0,0 @@ -PKG_NAME=capi-web-history -TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/web_history/TETware -TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware diff --git a/TC/web_history/push.sh b/TC/web_history/push.sh deleted file mode 100755 index 5eb9510..0000000 --- a/TC/web_history/push.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. ./config - -TC_PATH=/opt/home/$PKG_NAME - -echo $TC_PATH - -sdb shell "mkdir -p $TC_PATH" - -sdb push . $TC_PATH - - diff --git a/TC/web_history/run.sh b/TC/web_history/run.sh deleted file mode 100755 index cec5778..0000000 --- a/TC/web_history/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -source ./_export_target_env.sh - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_history/testcase/Makefile b/TC/web_history/testcase/Makefile deleted file mode 100644 index 811d781..0000000 --- a/TC/web_history/testcase/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include ../config - -CC ?= gcc - -C_FILES = $(shell ls *.c) - -PKGS = $(PKG_NAME) -PKGS += glib-2.0 -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 - -TCS := $(shell ls -1 *.c | cut -d. -f1) - -all: $(TCS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TCS) diff --git a/TC/web_history/testcase/tslist b/TC/web_history/testcase/tslist deleted file mode 100755 index c9e008e..0000000 --- a/TC/web_history/testcase/tslist +++ /dev/null @@ -1,34 +0,0 @@ -/testcase/utc_web_history_create -/testcase/utc_web_history_delete -/testcase/utc_web_history_set_url -/testcase/utc_web_history_set_title -/testcase/utc_web_history_set_frequency -/testcase/utc_web_history_set_date_created -/testcase/utc_web_history_set_date_modified -/testcase/utc_web_history_set_date_visited -/testcase/utc_web_history_set_icon -/testcase/utc_web_history_set_snapshot -/testcase/utc_web_history_set_webicon -/testcase/utc_web_history_get_url -/testcase/utc_web_history_get_title -/testcase/utc_web_history_get_frequency -/testcase/utc_web_history_get_date_created -/testcase/utc_web_history_get_date_modified -/testcase/utc_web_history_get_date_visited -/testcase/utc_web_history_get_icon -/testcase/utc_web_history_get_snapshot -/testcase/utc_web_history_get_webicon -/testcase/utc_web_history_easy_create -/testcase/utc_web_history_get_info -/testcase/utc_web_history_visit -/testcase/utc_web_history_limit_size -/testcase/utc_web_history_get_date_count -/testcase/utc_web_history_get_date_ids_p -/testcase/utc_web_history_get_duplicated_ids_p -/testcase/utc_web_history_get_inquired_ids_p -/testcase/utc_web_history_get_cond_ids_p -/testcase/utc_web_history_get_timestamp_ids_p -/testcase/utc_web_history_get_raw_retrieved_ids_p -/testcase/utc_web_history_get_errorcode -/testcase/utc_web_history_easy_free -/testcase/utc_web_history_reset diff --git a/TC/web_history/testcase/utc_web_history_create.c b/TC/web_history/testcase/utc_web_history_create.c deleted file mode 100755 index 21bb9c4..0000000 --- a/TC/web_history/testcase/utc_web_history_create.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_create_n(void); -static void utc_web_history_create_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_create_n, NEGATIVE_TC_IDX }, - { utc_web_history_create_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_create() - */ -static void utc_web_history_create_n(void) -{ - int ret = bp_history_adaptor_create(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_create() - */ -static void utc_web_history_create_p(void) -{ - int id = -1; - int ret = bp_history_adaptor_create(&id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_create failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_delete.c b/TC/web_history/testcase/utc_web_history_delete.c deleted file mode 100755 index ad56567..0000000 --- a/TC/web_history/testcase/utc_web_history_delete.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_delete_n(void); -static void utc_web_history_delete_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_delete_n, NEGATIVE_TC_IDX }, - { utc_web_history_delete_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_delete() - */ -static void utc_web_history_delete_n(void) -{ - int ret = bp_history_adaptor_delete(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_delete() - */ -static void utc_web_history_delete_p(void) -{ - int id = -1; - int ret = bp_history_adaptor_create(&id); - if (ret == 0) - ret = bp_history_adaptor_delete(id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_create failed"); -} - diff --git a/TC/web_history/testcase/utc_web_history_easy_create.c b/TC/web_history/testcase/utc_web_history_easy_create.c deleted file mode 100755 index 8998def..0000000 --- a/TC/web_history/testcase/utc_web_history_easy_create.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_easy_create_n(void); -static void utc_web_history_easy_create_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_easy_create_n, NEGATIVE_TC_IDX }, - { utc_web_history_easy_create_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_easy_create() - */ -static void utc_web_history_easy_create_n(void) -{ - int ret = bp_history_adaptor_easy_create(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_easy_create() - */ -static void utc_web_history_easy_create_p(void) -{ - bp_history_info_fmt info; - memset(&info, 0x00, sizeof(bp_history_info_fmt)); - info.url = "URL"; - info.title = "TITLE"; - info.frequency = 0; - int id = -1; - int ret = bp_history_adaptor_easy_create(&id, &info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_easy_create failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_easy_free.c b/TC/web_history/testcase/utc_web_history_easy_free.c deleted file mode 100755 index 7dd7c97..0000000 --- a/TC/web_history/testcase/utc_web_history_easy_free.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_easy_free_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_easy_free_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_history_adaptor_easy_free() - */ -static void utc_web_history_easy_free_p(void) -{ - bp_history_adaptor_easy_free(NULL); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_history/testcase/utc_web_history_get_cond_ids_p.c b/TC/web_history/testcase/utc_web_history_get_cond_ids_p.c deleted file mode 100755 index e2272cf..0000000 --- a/TC/web_history/testcase/utc_web_history_get_cond_ids_p.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_cond_ids_p_n(void); -static void utc_web_history_get_cond_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_cond_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_cond_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_cond_ids_p() - */ -static void utc_web_history_get_cond_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_cond_ids_p(NULL, NULL, NULL, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_cond_ids_p() - */ -static void utc_web_history_get_cond_ids_p_p(void) -{ - bp_history_rows_cond_fmt conds; - memset(&conds, 0x00, sizeof(bp_history_rows_cond_fmt)); - conds.limit = -1; - conds.offset = 0; - conds.order_offset = BP_HISTORY_O_FREQUENCY; - conds.ordering = 0; - conds.period_offset = BP_HISTORY_O_DATE_CREATED; - conds.period_type = BP_HISTORY_DATE_ALL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_cond_ids_p(&ids, &ids_count, &conds, - BP_HISTORY_O_TITLE | BP_HISTORY_O_URL, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_cond_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_date_count.c b/TC/web_history/testcase/utc_web_history_get_date_count.c deleted file mode 100755 index bde8e86..0000000 --- a/TC/web_history/testcase/utc_web_history_get_date_count.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_date_count_n(void); -static void utc_web_history_get_date_count_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_date_count_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_date_count_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_date_count() - */ -static void utc_web_history_get_date_count_n(void) -{ - int ret = bp_history_adaptor_get_date_count(NULL, 0, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_date_count() - */ -static void utc_web_history_get_date_count_p(void) -{ - int ids_count = 0; - int ret = bp_history_adaptor_get_date_count(&ids_count, - BP_HISTORY_O_DATE_VISITED, BP_HISTORY_DATE_ALL); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_date_count failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_date_created.c b/TC/web_history/testcase/utc_web_history_get_date_created.c deleted file mode 100755 index 349d74b..0000000 --- a/TC/web_history/testcase/utc_web_history_get_date_created.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_date_created_n(void); -static void utc_web_history_get_date_created_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_date_created_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_date_created() - */ -static void utc_web_history_get_date_created_n(void) -{ - int ret = bp_history_adaptor_get_date_created(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_date_created() - */ -static void utc_web_history_get_date_created_p(void) -{ - int value = -1; - int ret = bp_history_adaptor_get_date_created(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_date_created failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_date_ids_p.c b/TC/web_history/testcase/utc_web_history_get_date_ids_p.c deleted file mode 100755 index 123f94a..0000000 --- a/TC/web_history/testcase/utc_web_history_get_date_ids_p.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_date_ids_p_n(void); -static void utc_web_history_get_date_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_date_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_date_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_date_ids_p() - */ -static void utc_web_history_get_date_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_date_ids_p(NULL, NULL, -1, 0, 0, 0, - 0, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_date_ids_p() - */ -static void utc_web_history_get_date_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_date_ids_p(&ids, &ids_count, -1, 0, - BP_HISTORY_O_DATE_VISITED, 0/*ASC*/, - BP_HISTORY_O_DATE_VISITED, BP_HISTORY_DATE_ALL); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_date_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_date_modified.c b/TC/web_history/testcase/utc_web_history_get_date_modified.c deleted file mode 100755 index 6c33ca8..0000000 --- a/TC/web_history/testcase/utc_web_history_get_date_modified.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_date_modified_n(void); -static void utc_web_history_get_date_modified_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_date_modified_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_date_modified() - */ -static void utc_web_history_get_date_modified_n(void) -{ - int ret = bp_history_adaptor_get_date_modified(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_date_modified() - */ -static void utc_web_history_get_date_modified_p(void) -{ - int value = -1; - int ret = bp_history_adaptor_get_date_modified(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_date_modified failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_date_visited.c b/TC/web_history/testcase/utc_web_history_get_date_visited.c deleted file mode 100755 index 9fdc945..0000000 --- a/TC/web_history/testcase/utc_web_history_get_date_visited.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_date_visited_n(void); -static void utc_web_history_get_date_visited_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_date_visited_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_date_visited_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_date_visited() - */ -static void utc_web_history_get_date_visited_n(void) -{ - int ret = bp_history_adaptor_get_date_visited(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_date_visited() - */ -static void utc_web_history_get_date_visited_p(void) -{ - int value = -1; - int ret = bp_history_adaptor_get_date_visited(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_date_visited failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_duplicated_ids_p.c b/TC/web_history/testcase/utc_web_history_get_duplicated_ids_p.c deleted file mode 100755 index 0ca143e..0000000 --- a/TC/web_history/testcase/utc_web_history_get_duplicated_ids_p.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_duplicated_ids_p_n(void); -static void utc_web_history_get_duplicated_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_duplicated_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_duplicated_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_duplicated_ids_p() - */ -static void utc_web_history_get_duplicated_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_duplicated_ids_p(NULL, NULL, -1, 0, - 0, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_duplicated_ids_p() - */ -static void utc_web_history_get_duplicated_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_duplicated_ids_p(&ids, &ids_count, 1, 0, - BP_HISTORY_O_DATE_VISITED, 0/*ASC*/, - BP_HISTORY_O_TITLE | BP_HISTORY_O_URL, "URL", 0); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_duplicated_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_errorcode.c b/TC/web_history/testcase/utc_web_history_get_errorcode.c deleted file mode 100755 index 69a3b62..0000000 --- a/TC/web_history/testcase/utc_web_history_get_errorcode.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_errorcode_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_errorcode_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_errorcode() - */ -static void utc_web_history_get_errorcode_p(void) -{ - bp_history_adaptor_get_errorcode(); - dts_pass(__FUNCTION__); -} diff --git a/TC/web_history/testcase/utc_web_history_get_frequency.c b/TC/web_history/testcase/utc_web_history_get_frequency.c deleted file mode 100755 index 00f7b0d..0000000 --- a/TC/web_history/testcase/utc_web_history_get_frequency.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_frequency_n(void); -static void utc_web_history_get_frequency_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_frequency_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_frequency_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_frequency() - */ -static void utc_web_history_get_frequency_n(void) -{ - int ret = bp_history_adaptor_get_frequency(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_frequency() - */ -static void utc_web_history_get_frequency_p(void) -{ - int value = -1; - int ret = bp_history_adaptor_get_frequency(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_frequency failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_icon.c b/TC/web_history/testcase/utc_web_history_get_icon.c deleted file mode 100755 index 49e7d11..0000000 --- a/TC/web_history/testcase/utc_web_history_get_icon.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_icon_n(void); -static void utc_web_history_get_icon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_icon_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_icon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_icon() - */ -static void utc_web_history_get_icon_n(void) -{ - int ret = bp_history_adaptor_get_icon(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_icon() - */ -static void utc_web_history_get_icon_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_history_adaptor_get_icon(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_snapshot failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_info.c b/TC/web_history/testcase/utc_web_history_get_info.c deleted file mode 100755 index 250344e..0000000 --- a/TC/web_history/testcase/utc_web_history_get_info.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_info_n(void); -static void utc_web_history_get_info_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_info_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_info_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_info() - */ -static void utc_web_history_get_info_n(void) -{ - int ret = bp_history_adaptor_get_info(-1, 0, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_info() - */ -static void utc_web_history_get_info_p(void) -{ - unsigned int b_offset = (BP_HISTORY_O_FREQUENCY | BP_HISTORY_O_DATE_CREATED | BP_HISTORY_O_DATE_MODIFIED | BP_HISTORY_O_DATE_VISITED | BP_HISTORY_O_URL | BP_HISTORY_O_TITLE); - bp_history_info_fmt info; - memset(&info, 0x00, sizeof(bp_history_info_fmt)); - int ret = bp_history_adaptor_get_info(g_testcase_id, b_offset, &info); - bp_history_adaptor_easy_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_info failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_inquired_ids_p.c b/TC/web_history/testcase/utc_web_history_get_inquired_ids_p.c deleted file mode 100755 index 4a41a88..0000000 --- a/TC/web_history/testcase/utc_web_history_get_inquired_ids_p.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_inquired_ids_p_n(void); -static void utc_web_history_get_inquired_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_inquired_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_inquired_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_inquired_ids_p() - */ -static void utc_web_history_get_inquired_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_inquired_ids_p(NULL, NULL, -1, 0, - 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_inquired_ids_p() - */ -static void utc_web_history_get_inquired_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_inquired_ids_p(&ids, &ids_count, -1, 0, - BP_HISTORY_O_DATE_VISITED, 0/*ASC*/, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_inquired_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_raw_retrieved_ids_p.c b/TC/web_history/testcase/utc_web_history_get_raw_retrieved_ids_p.c deleted file mode 100755 index 2d638e8..0000000 --- a/TC/web_history/testcase/utc_web_history_get_raw_retrieved_ids_p.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_raw_retrieved_ids_p_n(void); -static void utc_web_history_get_raw_retrieved_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_raw_retrieved_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_raw_retrieved_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_raw_retrieved_ids_p() - */ -static void utc_web_history_get_raw_retrieved_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_raw_retrieved_ids_p(NULL, NULL, NULL, - 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_raw_retrieved_ids_p() - */ -static void utc_web_history_get_raw_retrieved_ids_p_p(void) -{ - bp_history_rows_cond_fmt conds; - memset(&conds, 0x00, sizeof(bp_history_rows_cond_fmt)); - conds.limit = -1; - conds.offset = 0; - conds.order_offset = BP_HISTORY_O_FREQUENCY; - conds.ordering = 0; - conds.period_offset = BP_HISTORY_O_DATE_CREATED; - conds.period_type = BP_HISTORY_DATE_ALL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_raw_retrieved_ids_p(&ids, &ids_count, - &conds, BP_HISTORY_O_URL, "%U%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_raw_retrieved_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_snapshot.c b/TC/web_history/testcase/utc_web_history_get_snapshot.c deleted file mode 100755 index f231af9..0000000 --- a/TC/web_history/testcase/utc_web_history_get_snapshot.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_snapshot_n(void); -static void utc_web_history_get_snapshot_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_snapshot_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_snapshot() - */ -static void utc_web_history_get_snapshot_n(void) -{ - int ret = bp_history_adaptor_get_snapshot(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_snapshot() - */ -static void utc_web_history_get_snapshot_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_history_adaptor_get_snapshot(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_snapshot failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_timestamp_ids_p.c b/TC/web_history/testcase/utc_web_history_get_timestamp_ids_p.c deleted file mode 100755 index 9312867..0000000 --- a/TC/web_history/testcase/utc_web_history_get_timestamp_ids_p.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_timestamp_ids_p_n(void); -static void utc_web_history_get_timestamp_ids_p_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_timestamp_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_timestamp_ids_p_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_timestamp_ids_p() - */ -static void utc_web_history_get_timestamp_ids_p_n(void) -{ - int ret = bp_history_adaptor_get_timestamp_ids_p(NULL, NULL, NULL, - NULL, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_timestamp_ids_p() - */ -static void utc_web_history_get_timestamp_ids_p_p(void) -{ - bp_history_rows_fmt limits; - memset(&limits, 0x00, sizeof(bp_history_rows_fmt)); - limits.limit = -1; - limits.offset = 0; - limits.order_offset = BP_HISTORY_O_FREQUENCY; - limits.ordering = 0; - - int times_count = 2; - - bp_history_timestamp_fmt timestamps[times_count]; - timestamps[0].offset = BP_HISTORY_O_DATE_CREATED; - timestamps[0].timestamp = (int)time(NULL) - 6000; - timestamps[0].cmp_operator = BP_HISTORY_OP_GREATER_QUEAL; - timestamps[1].conds_operator = 0; - timestamps[1].offset = BP_HISTORY_O_DATE_CREATED; - timestamps[1].timestamp = (int)time(NULL); - timestamps[1].cmp_operator = BP_HISTORY_OP_LESS_QUEAL; - int *ids = NULL; - int ids_count = 0; - int ret = bp_history_adaptor_get_timestamp_ids_p(&ids, &ids_count, - &limits, timestamps, times_count, BP_HISTORY_O_TITLE, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_timestamp_ids_p failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_title.c b/TC/web_history/testcase/utc_web_history_get_title.c deleted file mode 100755 index 3826dc9..0000000 --- a/TC/web_history/testcase/utc_web_history_get_title.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_title_n(void); -static void utc_web_history_get_title_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_title_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_title_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_title() - */ -static void utc_web_history_get_title_n(void) -{ - int ret = bp_history_adaptor_get_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_title() - */ -static void utc_web_history_get_title_p(void) -{ - char *value = NULL; - int ret = bp_history_adaptor_get_title(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_title failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_url.c b/TC/web_history/testcase/utc_web_history_get_url.c deleted file mode 100755 index d871432..0000000 --- a/TC/web_history/testcase/utc_web_history_get_url.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_url_n(void); -static void utc_web_history_get_url_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_url_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_url_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_url() - */ -static void utc_web_history_get_url_n(void) -{ - int ret = bp_history_adaptor_get_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_url() - */ -static void utc_web_history_get_url_p(void) -{ - char *value = NULL; - int ret = bp_history_adaptor_get_url(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_url failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_get_webicon.c b/TC/web_history/testcase/utc_web_history_get_webicon.c deleted file mode 100755 index 7ad9e06..0000000 --- a/TC/web_history/testcase/utc_web_history_get_webicon.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_get_webicon_n(void); -static void utc_web_history_get_webicon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_get_webicon_n, NEGATIVE_TC_IDX }, - { utc_web_history_get_webicon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_get_webicon() - */ -static void utc_web_history_get_webicon_n(void) -{ - int ret = bp_history_adaptor_get_webicon(-1, NULL, NULL, NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_get_webicon() - */ -static void utc_web_history_get_webicon_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_history_adaptor_get_webicon(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_get_webicon failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_limit_size.c b/TC/web_history/testcase/utc_web_history_limit_size.c deleted file mode 100755 index bc87834..0000000 --- a/TC/web_history/testcase/utc_web_history_limit_size.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_limit_size_n(void); -static void utc_web_history_limit_size_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_limit_size_n, NEGATIVE_TC_IDX }, - { utc_web_history_limit_size_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_limit_size() - */ -static void utc_web_history_limit_size_n(void) -{ - int ret = bp_history_adaptor_limit_size(-1, 0, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_limit_size() - */ -static void utc_web_history_limit_size_p(void) -{ - int ret = bp_history_adaptor_limit_size(1000, BP_HISTORY_O_DATE_VISITED, 0/*ASC*/); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_limit_size failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_reset.c b/TC/web_history/testcase/utc_web_history_reset.c deleted file mode 100755 index a3251a9..0000000 --- a/TC/web_history/testcase/utc_web_history_reset.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_reset_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_reset_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Positive test case of bp_history_adaptor_reset() - */ -static void utc_web_history_reset_p(void) -{ - bp_history_adaptor_reset(); - dts_pass(__FUNCTION__); -} - diff --git a/TC/web_history/testcase/utc_web_history_set_date_created.c b/TC/web_history/testcase/utc_web_history_set_date_created.c deleted file mode 100755 index ec6ed2d..0000000 --- a/TC/web_history/testcase/utc_web_history_set_date_created.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_date_created_n(void); -static void utc_web_history_set_date_created_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_date_created_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_date_created() - */ -static void utc_web_history_set_date_created_n(void) -{ - int ret = bp_history_adaptor_set_date_created(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_date_created() - */ -static void utc_web_history_set_date_created_p(void) -{ - int ret = bp_history_adaptor_set_date_created(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_date_created failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_date_modified.c b/TC/web_history/testcase/utc_web_history_set_date_modified.c deleted file mode 100755 index 2616629..0000000 --- a/TC/web_history/testcase/utc_web_history_set_date_modified.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_date_modified_n(void); -static void utc_web_history_set_date_modified_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_date_modified_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_date_modified() - */ -static void utc_web_history_set_date_modified_n(void) -{ - int ret = bp_history_adaptor_set_date_modified(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_date_modified() - */ -static void utc_web_history_set_date_modified_p(void) -{ - int ret = bp_history_adaptor_set_date_modified(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_date_modified failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_date_visited.c b/TC/web_history/testcase/utc_web_history_set_date_visited.c deleted file mode 100755 index f3a86f7..0000000 --- a/TC/web_history/testcase/utc_web_history_set_date_visited.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_date_visited_n(void); -static void utc_web_history_set_date_visited_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_date_visited_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_date_visited_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_date_visited() - */ -static void utc_web_history_set_date_visited_n(void) -{ - int ret = bp_history_adaptor_set_date_visited(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_date_visited() - */ -static void utc_web_history_set_date_visited_p(void) -{ - int ret = bp_history_adaptor_set_date_visited(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_date_visited failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_frequency.c b/TC/web_history/testcase/utc_web_history_set_frequency.c deleted file mode 100755 index 878ff91..0000000 --- a/TC/web_history/testcase/utc_web_history_set_frequency.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_frequency_n(void); -static void utc_web_history_set_frequency_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_frequency_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_frequency_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_frequency() - */ -static void utc_web_history_set_frequency_n(void) -{ - int ret = bp_history_adaptor_set_frequency(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_frequency() - */ -static void utc_web_history_set_frequency_p(void) -{ - int ret = bp_history_adaptor_set_frequency(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_frequency failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_icon.c b/TC/web_history/testcase/utc_web_history_set_icon.c deleted file mode 100755 index 5ea2bdf..0000000 --- a/TC/web_history/testcase/utc_web_history_set_icon.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_icon_n(void); -static void utc_web_history_set_icon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_icon_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_icon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_icon() - */ -static void utc_web_history_set_icon_n(void) -{ - unsigned char *value = NULL; - int ret = bp_history_adaptor_set_icon(-1, 0, 0, &value, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_icon() - */ -static void utc_web_history_set_icon_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_history_adaptor_set_icon(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_icon failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_snapshot.c b/TC/web_history/testcase/utc_web_history_set_snapshot.c deleted file mode 100755 index 7dd9d1b..0000000 --- a/TC/web_history/testcase/utc_web_history_set_snapshot.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_snapshot_n(void); -static void utc_web_history_set_snapshot_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_snapshot_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_snapshot() - */ -static void utc_web_history_set_snapshot_n(void) -{ - unsigned char *value = NULL; - int ret = bp_history_adaptor_set_snapshot(-1, 0, 0, &value, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_snapshot() - */ -static void utc_web_history_set_snapshot_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_history_adaptor_set_snapshot(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_snapshot failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_title.c b/TC/web_history/testcase/utc_web_history_set_title.c deleted file mode 100755 index 52e60f4..0000000 --- a/TC/web_history/testcase/utc_web_history_set_title.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_title_n(void); -static void utc_web_history_set_title_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_title_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_title_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_title() - */ -static void utc_web_history_set_title_n(void) -{ - int ret = bp_history_adaptor_set_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_title() - */ -static void utc_web_history_set_title_p(void) -{ - int ret = bp_history_adaptor_set_title(g_testcase_id, "TITLE"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_title failed"); -} - diff --git a/TC/web_history/testcase/utc_web_history_set_url.c b/TC/web_history/testcase/utc_web_history_set_url.c deleted file mode 100755 index 72fe942..0000000 --- a/TC/web_history/testcase/utc_web_history_set_url.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_url_n(void); -static void utc_web_history_set_url_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_url_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_url_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_url() - */ -static void utc_web_history_set_url_n(void) -{ - int ret = bp_history_adaptor_set_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_url() - */ -static void utc_web_history_set_url_p(void) -{ - int ret = bp_history_adaptor_set_url(g_testcase_id, "URL"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_url failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_set_webicon.c b/TC/web_history/testcase/utc_web_history_set_webicon.c deleted file mode 100755 index 7580abf..0000000 --- a/TC/web_history/testcase/utc_web_history_set_webicon.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_set_webicon_n(void); -static void utc_web_history_set_webicon_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_set_webicon_n, NEGATIVE_TC_IDX }, - { utc_web_history_set_webicon_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_set_webicon() - */ -static void utc_web_history_set_webicon_n(void) -{ - int ret = bp_history_adaptor_set_webicon(-1, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_set_webicon() - */ -static void utc_web_history_set_webicon_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_history_adaptor_set_webicon(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_set_webicon failed"); -} diff --git a/TC/web_history/testcase/utc_web_history_visit.c b/TC/web_history/testcase/utc_web_history_visit.c deleted file mode 100755 index 67a8d63..0000000 --- a/TC/web_history/testcase/utc_web_history_visit.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_history_visit_n(void); -static void utc_web_history_visit_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_history_visit_n, NEGATIVE_TC_IDX }, - { utc_web_history_visit_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_history_adaptor_initialize(); - bp_history_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_history_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Negative test case of bp_history_adaptor_visit() - */ -static void utc_web_history_visit_n(void) -{ - int ret = bp_history_adaptor_visit(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_history_adaptor_visit() - */ -static void utc_web_history_visit_p(void) -{ - int ret = bp_history_adaptor_visit(g_testcase_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_history_adaptor_visit failed"); -} diff --git a/TC/web_history/tet_scen b/TC/web_history/tet_scen deleted file mode 100644 index 03f029a..0000000 --- a/TC/web_history/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/testcase/tslist diff --git a/TC/web_history/tetbuild.cfg b/TC/web_history/tetbuild.cfg deleted file mode 100644 index f7eda55..0000000 --- a/TC/web_history/tetbuild.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option for build operation checking -TET_BUILD_TOOL=make # build with using make command -TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build -TET_API_COMPLIANT=True # use TET API in Test Case ? -TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/web_history/tetclean.cfg b/TC/web_history/tetclean.cfg deleted file mode 100644 index 02d7030..0000000 --- a/TC/web_history/tetclean.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option -TET_CLEAN_TOOL= make clean # clean tool -TET_CLEAN_FILE= Makefile # file for clean -TET_API_COMPLIANT=True # TET API useage -TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/web_history/tetexec.cfg b/TC/web_history/tetexec.cfg deleted file mode 100644 index ef3e452..0000000 --- a/TC/web_history/tetexec.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capturing execution or not -TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional -TET_EXEC_FILE= # ex) exectool : execution file/ Optional -TET_API_COMPLIANT=True # Test case or Tool usesTET API? -TET_PASS_TC_NAME=True # showing Passed TC name ? diff --git a/TC/web_tab/_export_env.sh b/TC/web_tab/_export_env.sh deleted file mode 100755 index 7a317f8..0000000 --- a/TC/web_tab/_export_env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -source ./config - -export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware target path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path -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 diff --git a/TC/web_tab/_export_target_env.sh b/TC/web_tab/_export_target_env.sh deleted file mode 100755 index 3fd8e3f..0000000 --- a/TC/web_tab/_export_target_env.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -. ./config - -export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path -#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator -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 diff --git a/TC/web_tab/build.sh b/TC/web_tab/build.sh deleted file mode 100755 index 72aad6c..0000000 --- a/TC/web_tab/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_tab/clean.sh b/TC/web_tab/clean.sh deleted file mode 100755 index 29743e0..0000000 --- a/TC/web_tab/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -RESULT_DIR=results - -tcc -c -p ./ # executing tcc, with clean option (-c) -rm -r $RESULT_DIR -rm -r tet_tmp_dir -rm testcase/tet_captured diff --git a/TC/web_tab/config b/TC/web_tab/config deleted file mode 100644 index 46a7242..0000000 --- a/TC/web_tab/config +++ /dev/null @@ -1,3 +0,0 @@ -PKG_NAME=capi-web-tab -TET_INSTALL_HOST_PATH=/var/tmp/dts_fw/TC/web_tab/TETware -TET_INSTALL_TARGET_PATH=/opt/home/$PKG_NAME/TETware diff --git a/TC/web_tab/push.sh b/TC/web_tab/push.sh deleted file mode 100755 index 5eb9510..0000000 --- a/TC/web_tab/push.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. ./config - -TC_PATH=/opt/home/$PKG_NAME - -echo $TC_PATH - -sdb shell "mkdir -p $TC_PATH" - -sdb push . $TC_PATH - - diff --git a/TC/web_tab/run.sh b/TC/web_tab/run.sh deleted file mode 100755 index cec5778..0000000 --- a/TC/web_tab/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -source ./_export_target_env.sh - -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 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/web_tab/test.png b/TC/web_tab/test.png deleted file mode 100644 index c5ec238..0000000 Binary files a/TC/web_tab/test.png and /dev/null differ diff --git a/TC/web_tab/testcase/Makefile b/TC/web_tab/testcase/Makefile deleted file mode 100644 index 811d781..0000000 --- a/TC/web_tab/testcase/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include ../config - -CC ?= gcc - -C_FILES = $(shell ls *.c) - -PKGS = $(PKG_NAME) -PKGS += glib-2.0 -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 - -TCS := $(shell ls -1 *.c | cut -d. -f1) - -all: $(TCS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TCS) diff --git a/TC/web_tab/testcase/tslist b/TC/web_tab/testcase/tslist deleted file mode 100755 index db7495c..0000000 --- a/TC/web_tab/testcase/tslist +++ /dev/null @@ -1 +0,0 @@ -/testcase/utc_web_tab diff --git a/TC/web_tab/testcase/utc_web_tab.c b/TC/web_tab/testcase/utc_web_tab.c deleted file mode 100644 index 7bcbe53..0000000 --- a/TC/web_tab/testcase/utc_web_tab.c +++ /dev/null @@ -1,1583 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 - -#include -#include - -enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, -}; - -static int g_testcase_id = -1; - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_web_tab_get_full_ids_p_n(void); -static void utc_web_tab_get_full_ids_p_p(void); -static void utc_web_tab_get_full_with_deleted_ids_p_n(void); -static void utc_web_tab_get_full_with_deleted_ids_p_p(void); -static void utc_web_tab_get_dirty_ids_p_n(void); -static void utc_web_tab_get_dirty_ids_p_p(void); -static void utc_web_tab_get_deleted_ids_p_n(void); -static void utc_web_tab_get_deleted_ids_p_p(void); -static void utc_web_tab_get_index_n(void); -static void utc_web_tab_get_index_p(void); -static void utc_web_tab_get_activated_n(void); -static void utc_web_tab_get_activated_p(void); -static void utc_web_tab_get_incognito_p(void); -static void utc_web_tab_get_incognito_n(void); -static void utc_web_tab_get_url_n(void); -static void utc_web_tab_get_url_p(void); -static void utc_web_tab_get_title_n(void); -static void utc_web_tab_get_title_p(void); -static void utc_web_tab_get_date_created_n(void); -static void utc_web_tab_get_date_created_p(void); -static void utc_web_tab_get_date_modified_n(void); -static void utc_web_tab_get_date_modified_p(void); -static void utc_web_tab_get_account_name_n(void); -static void utc_web_tab_get_account_name_p(void); -static void utc_web_tab_get_account_type_n(void); -static void utc_web_tab_get_account_type_p(void); -static void utc_web_tab_get_device_name_n(void); -static void utc_web_tab_get_device_name_p(void); -static void utc_web_tab_get_device_id_n(void); -static void utc_web_tab_get_device_id_p(void); -static void utc_web_tab_get_usage_n(void); -static void utc_web_tab_get_usage_p(void); -static void utc_web_tab_get_sync_n(void); -static void utc_web_tab_get_sync_p(void); -static void utc_web_tab_get_icon_n(void); -static void utc_web_tab_get_icon_p(void); -static void utc_web_tab_get_icon_png_p(void); -static void utc_web_tab_get_icon_png_n(void); -static void utc_web_tab_get_snapshot_n(void); -static void utc_web_tab_get_snapshot_p(void); -static void utc_web_tab_set_dirty_n(void); -static void utc_web_tab_set_dirty_p(void); -static void utc_web_tab_set_deleted_n(void); -static void utc_web_tab_set_deleted_p(void); -static void utc_web_tab_set_index_n(void); -static void utc_web_tab_set_index_p(void); -static void utc_web_tab_set_activated_n(void); -static void utc_web_tab_set_activated_p(void); -static void utc_web_tab_set_incognito_p(void); -static void utc_web_tab_set_incognito_n(void); -static void utc_web_tab_set_url_n(void); -static void utc_web_tab_set_url_p(void); -static void utc_web_tab_set_title_n(void); -static void utc_web_tab_set_title_p(void); -static void utc_web_tab_set_date_created_n(void); -static void utc_web_tab_set_date_created_p(void); -static void utc_web_tab_set_date_modified_n(void); -static void utc_web_tab_set_date_modified_p(void); -static void utc_web_tab_set_account_name_n(void); -static void utc_web_tab_set_account_name_p(void); -static void utc_web_tab_set_account_type_n(void); -static void utc_web_tab_set_account_type_p(void); -static void utc_web_tab_set_device_name_n(void); -static void utc_web_tab_set_device_name_p(void); -static void utc_web_tab_set_device_id_n(void); -static void utc_web_tab_set_device_id_p(void); -static void utc_web_tab_set_usage_n(void); -static void utc_web_tab_set_usage_p(void); -static void utc_web_tab_set_sync_n(void); -static void utc_web_tab_set_sync_p(void); -static void utc_web_tab_set_icon_n(void); -static void utc_web_tab_set_icon_p(void); -static void utc_web_tab_set_icon_png_n(void); -static void utc_web_tab_set_icon_png_p(void); -static void utc_web_tab_set_snapshot_n(void); -static void utc_web_tab_set_snapshot_p(void); -static void utc_web_tab_create_n(void); -static void utc_web_tab_create_p(void); -static void utc_web_tab_delete_n(void); -static void utc_web_tab_delete_p(void); -static void utc_web_tab_easy_create_n(void); -static void utc_web_tab_easy_create_p(void); -static void utc_web_tab_get_easy_all_n(void); -static void utc_web_tab_get_easy_all_p(void); -static void utc_web_tab_get_info_n(void); -static void utc_web_tab_get_info_p(void); -static void utc_web_tab_activate_n(void); -static void utc_web_tab_activate_p(void); -static void utc_web_tab_get_duplicated_ids_p_n(void); -static void utc_web_tab_get_duplicated_ids_p_p(void); -static void utc_web_tab_set_data_changed_cb_p(void); -static void utc_web_tab_set_data_changed_cb_n(void); -static void utc_web_tab_unset_data_changed_cb_n(void); -static void utc_web_tab_unset_data_changed_cb_p(void); -static void utc_web_tab_is_setted_data_changed_cb_n(void); -static void utc_web_tab_is_setted_data_changed_cb_p(void); -static void utc_web_tab_publish_notification_p(void); -static void utc_web_tab_clear_dirty_ids_p(void); -static void utc_web_tab_clear_deleted_ids_p(void); -static void utc_web_tab_get_errorcode_p(void); -static void utc_web_tab_easy_free_p(void); - - -struct tet_testlist tet_testlist[] = { - { utc_web_tab_set_index_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_index_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_activated_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_activated_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_incognito_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_incognito_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_url_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_url_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_title_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_title_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_date_created_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_date_modified_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_account_name_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_account_name_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_account_type_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_account_type_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_device_name_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_device_name_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_device_id_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_device_id_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_usage_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_usage_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_sync_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_sync_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_icon_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_icon_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_icon_png_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_icon_png_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_snapshot_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_dirty_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_dirty_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_deleted_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_deleted_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_full_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_full_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_full_with_deleted_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_full_with_deleted_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_dirty_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_dirty_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_deleted_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_deleted_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_index_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_index_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_activated_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_activated_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_incognito_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_incognito_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_url_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_url_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_title_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_title_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_date_created_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_date_created_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_date_modified_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_date_modified_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_account_name_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_account_name_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_account_type_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_account_type_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_device_name_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_device_name_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_device_id_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_device_id_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_usage_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_usage_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_sync_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_sync_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_icon_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_icon_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_icon_png_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_icon_png_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_snapshot_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_snapshot_p, POSITIVE_TC_IDX }, - { utc_web_tab_create_n, NEGATIVE_TC_IDX }, - { utc_web_tab_create_p, POSITIVE_TC_IDX }, - { utc_web_tab_delete_n, NEGATIVE_TC_IDX }, - { utc_web_tab_delete_p, POSITIVE_TC_IDX }, - { utc_web_tab_activate_n, NEGATIVE_TC_IDX }, - { utc_web_tab_activate_p, POSITIVE_TC_IDX }, - { utc_web_tab_easy_create_n, NEGATIVE_TC_IDX }, - { utc_web_tab_easy_create_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_info_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_info_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_easy_all_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_easy_all_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_duplicated_ids_p_n, NEGATIVE_TC_IDX }, - { utc_web_tab_get_duplicated_ids_p_p, POSITIVE_TC_IDX }, - { utc_web_tab_set_data_changed_cb_n, NEGATIVE_TC_IDX }, - { utc_web_tab_set_data_changed_cb_p, POSITIVE_TC_IDX }, - { utc_web_tab_is_setted_data_changed_cb_n, NEGATIVE_TC_IDX }, - { utc_web_tab_is_setted_data_changed_cb_p, POSITIVE_TC_IDX }, - { utc_web_tab_unset_data_changed_cb_n, NEGATIVE_TC_IDX }, - { utc_web_tab_unset_data_changed_cb_p, POSITIVE_TC_IDX }, - { utc_web_tab_publish_notification_p, POSITIVE_TC_IDX }, - { utc_web_tab_clear_dirty_ids_p, POSITIVE_TC_IDX }, - { utc_web_tab_clear_deleted_ids_p, POSITIVE_TC_IDX }, - { utc_web_tab_get_errorcode_p, POSITIVE_TC_IDX }, - { utc_web_tab_easy_free_p, POSITIVE_TC_IDX }, - { NULL, 0 } -}; - - -static void startup(void) -{ - /* start of TC */ - tet_printf("\n TC start"); - bp_tab_adaptor_initialize(); - bp_tab_adaptor_create(&g_testcase_id); -} - - -static void cleanup(void) -{ - /* end of TC */ - bp_tab_adaptor_deinitialize(); - tet_printf("\n TC end"); -} - -/** - * @brief Callback function - */ -void tab_changed(void* user_data) -{ -} - - -/** - * @brief Negative test case of bp_tab_adaptor_get_full_ids_p() - */ -static void utc_web_tab_get_full_ids_p_n(void) -{ - int ret = bp_tab_adaptor_get_full_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_full_ids_p() - */ -static void utc_web_tab_get_full_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_tab_adaptor_get_full_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_full_ids_p failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_get_full_with_deleted_ids_p() - */ -static void utc_web_tab_get_full_with_deleted_ids_p_n(void) -{ - int ret = bp_tab_adaptor_get_full_with_deleted_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_full_with_deleted_ids_p() - */ -static void utc_web_tab_get_full_with_deleted_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_tab_adaptor_get_full_with_deleted_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_full_with_deleted_ids_p failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_dirty_ids_p() - */ -static void utc_web_tab_get_dirty_ids_p_n(void) -{ - int ret = bp_tab_adaptor_get_dirty_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_dirty_ids_p() - */ -static void utc_web_tab_get_dirty_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_tab_adaptor_get_dirty_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_dirty_ids_p failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_deleted_ids_p() - */ -static void utc_web_tab_get_deleted_ids_p_n(void) -{ - int ret = bp_tab_adaptor_get_deleted_ids_p(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_deleted_ids_p() - */ -static void utc_web_tab_get_deleted_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_tab_adaptor_get_deleted_ids_p(&ids, &ids_count); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_deleted_ids_p failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_index() - */ -static void utc_web_tab_get_index_n(void) -{ - int ret = bp_tab_adaptor_get_index(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_index() - */ -static void utc_web_tab_get_index_p(void) -{ - int value = -1; - int ret = bp_tab_adaptor_get_index(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_index failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_activated() - */ -static void utc_web_tab_get_activated_n(void) -{ - int ret = bp_tab_adaptor_get_activated(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_activated() - */ -static void utc_web_tab_get_activated_p(void) -{ - int value = -1; - int ret = bp_tab_adaptor_get_activated(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_index failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_incognito() - */ -static void utc_web_tab_get_incognito_n(void) -{ - int ret = bp_tab_adaptor_get_incognito(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_incognito() - */ -static void utc_web_tab_get_incognito_p(void) -{ - int value = -1; - int ret = bp_tab_adaptor_get_incognito(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_incognito failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_url() - */ -static void utc_web_tab_get_url_n(void) -{ - int ret = bp_tab_adaptor_get_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_url() - */ -static void utc_web_tab_get_url_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_url(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_url failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_title() - */ -static void utc_web_tab_get_title_n(void) -{ - int ret = bp_tab_adaptor_get_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_title() - */ -static void utc_web_tab_get_title_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_title(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_title failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_date_created() - */ -static void utc_web_tab_get_date_created_n(void) -{ - int ret = bp_tab_adaptor_get_date_created(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_date_created() - */ -static void utc_web_tab_get_date_created_p(void) -{ - int value = -1; - int ret = bp_tab_adaptor_get_date_created(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_date_created failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_date_modified() - */ -static void utc_web_tab_get_date_modified_n(void) -{ - int ret = bp_tab_adaptor_get_date_modified(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_date_modified() - */ -static void utc_web_tab_get_date_modified_p(void) -{ - int value = -1; - int ret = bp_tab_adaptor_get_date_modified(g_testcase_id, &value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_date_modified failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_account_name() - */ -static void utc_web_tab_get_account_name_n(void) -{ - int ret = bp_tab_adaptor_get_account_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_account_name() - */ -static void utc_web_tab_get_account_name_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_account_name(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_account_name failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_account_type() - */ -static void utc_web_tab_get_account_type_n(void) -{ - int ret = bp_tab_adaptor_get_account_type(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_account_type() - */ -static void utc_web_tab_get_account_type_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_account_type(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_account_type failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_device_name() - */ -static void utc_web_tab_get_device_name_n(void) -{ - int ret = bp_tab_adaptor_get_device_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_device_name() - */ -static void utc_web_tab_get_device_name_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_device_name(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_device_name failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_device_id() - */ -static void utc_web_tab_get_device_id_n(void) -{ - int ret = bp_tab_adaptor_get_device_id(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_device_id() - */ -static void utc_web_tab_get_device_id_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_device_id(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_device_id failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_get_usage() - */ -static void utc_web_tab_get_usage_n(void) -{ - int ret = bp_tab_adaptor_get_usage(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_usage() - */ -static void utc_web_tab_get_usage_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_usage(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_usage failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_sync() - */ -static void utc_web_tab_get_sync_n(void) -{ - int ret = bp_tab_adaptor_get_sync(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_sync() - */ -static void utc_web_tab_get_sync_p(void) -{ - char *value = NULL; - int ret = bp_tab_adaptor_get_sync(g_testcase_id, &value); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_sync failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_icon() - */ -static void utc_web_tab_get_icon_n(void) -{ - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_icon(-1, NULL, NULL, &value, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_icon() - */ -static void utc_web_tab_get_icon_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_icon(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_snapshot failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_icon_png() - */ -static void utc_web_tab_get_icon_png_n(void) -{ - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_icon_png(-1, &value, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_icon_png() - */ -static void utc_web_tab_get_icon_png_p(void) -{ - int length = 0; - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_icon_png(g_testcase_id, &value, - &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "utc_web_tab_get_icon_png_p failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_snapshot() - */ -static void utc_web_tab_get_snapshot_n(void) -{ - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_snapshot(-1, NULL, NULL, &value, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_snapshot() - */ -static void utc_web_tab_get_snapshot_p(void) -{ - int length = 0; - int width = 0; - int height = 0; - unsigned char *value = NULL; - int ret = bp_tab_adaptor_get_snapshot(g_testcase_id, &width, - &height, &value, &length); - free(value); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_snapshot failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_dirty() - */ -static void utc_web_tab_set_dirty_n(void) -{ - int ret = bp_tab_adaptor_set_dirty(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_dirty() - */ -static void utc_web_tab_set_dirty_p(void) -{ - int ret = bp_tab_adaptor_set_dirty(g_testcase_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_dirty failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_deleted() - */ -static void utc_web_tab_set_deleted_n(void) -{ - int ret = bp_tab_adaptor_set_deleted(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_deleted() - */ -static void utc_web_tab_set_deleted_p(void) -{ - int ret = bp_tab_adaptor_set_deleted(g_testcase_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_deleted failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_index() - */ -static void utc_web_tab_set_index_n(void) -{ - int ret = bp_tab_adaptor_set_index(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_index() - */ -static void utc_web_tab_set_index_p(void) -{ - int ret = bp_tab_adaptor_set_index(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_index failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_activated() - */ -static void utc_web_tab_set_activated_n(void) -{ - int ret = bp_tab_adaptor_set_activated(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_activated() - */ -static void utc_web_tab_set_activated_p(void) -{ - int ret = bp_tab_adaptor_set_activated(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_activated failed"); -} -/** - * @brief Negative test case of bp_tab_adaptor_set_incognito() - */ -static void utc_web_tab_set_incognito_n(void) -{ - int ret = bp_tab_adaptor_set_incognito(-1, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_incognito() - */ -static void utc_web_tab_set_incognito_p(void) -{ - int ret = bp_tab_adaptor_set_incognito(g_testcase_id, 0); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_incognito failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_usage() - */ -static void utc_web_tab_set_usage_n(void) -{ - int ret = bp_tab_adaptor_set_usage(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_usage() - */ -static void utc_web_tab_set_usage_p(void) -{ - int ret = bp_tab_adaptor_set_usage(g_testcase_id, "URL"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_usage failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_sync() - */ -static void utc_web_tab_set_sync_n(void) -{ - int ret = bp_tab_adaptor_set_sync(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_sync() - */ -static void utc_web_tab_set_sync_p(void) -{ - int ret = bp_tab_adaptor_set_sync(g_testcase_id, "URL"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_sync failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_url() - */ -static void utc_web_tab_set_url_n(void) -{ - int ret = bp_tab_adaptor_set_url(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_url() - */ -static void utc_web_tab_set_url_p(void) -{ - int ret = bp_tab_adaptor_set_url(g_testcase_id, "URL"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_url failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_title() - */ -static void utc_web_tab_set_title_n(void) -{ - int ret = bp_tab_adaptor_set_title(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_title() - */ -static void utc_web_tab_set_title_p(void) -{ - int ret = bp_tab_adaptor_set_title(g_testcase_id, "TITLE"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_title failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_date_created() - */ -static void utc_web_tab_set_date_created_n(void) -{ - int ret = bp_tab_adaptor_set_date_created(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_date_created() - */ -static void utc_web_tab_set_date_created_p(void) -{ - int ret = bp_tab_adaptor_set_date_created(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_date_created failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_date_modified() - */ -static void utc_web_tab_set_date_modified_n(void) -{ - int ret = bp_tab_adaptor_set_date_modified(-1, (int)time(NULL)); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_date_modified() - */ -static void utc_web_tab_set_date_modified_p(void) -{ - int ret = bp_tab_adaptor_set_date_modified(g_testcase_id, (int)time(NULL)); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_date_modified failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_account_name() - */ -static void utc_web_tab_set_account_name_n(void) -{ - int ret = bp_tab_adaptor_set_account_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_account_name() - */ -static void utc_web_tab_set_account_name_p(void) -{ - int ret = bp_tab_adaptor_set_account_name(g_testcase_id, "ACCOUNT_NAME"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_account_name failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_account_type() - */ -static void utc_web_tab_set_account_type_n(void) -{ - int ret = bp_tab_adaptor_set_account_type(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_account_type() - */ -static void utc_web_tab_set_account_type_p(void) -{ - int ret = bp_tab_adaptor_set_account_type(g_testcase_id, "ACCOUNT_TYPE"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_account_type failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_device_name() - */ -static void utc_web_tab_set_device_name_n(void) -{ - int ret = bp_tab_adaptor_set_device_name(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_device_name() - */ -static void utc_web_tab_set_device_name_p(void) -{ - int ret = bp_tab_adaptor_set_device_name(g_testcase_id, "DEVICE_NAME"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_device_name failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_device_id() - */ -static void utc_web_tab_set_device_id_n(void) -{ - int ret = bp_tab_adaptor_set_device_id(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_device_id() - */ -static void utc_web_tab_set_device_id_p(void) -{ - int ret = bp_tab_adaptor_set_device_id(g_testcase_id, "DEVICE_ID"); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_device_id failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_icon() - */ -static void utc_web_tab_set_icon_n(void) -{ - int ret = bp_tab_adaptor_set_icon(-1, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_icon() - */ -static void utc_web_tab_set_icon_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_tab_adaptor_set_icon(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_icon failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_set_icon_png() - */ -static void utc_web_tab_set_icon_png_n(void) -{ - int ret = bp_tab_adaptor_set_icon_png(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_icon_png() - */ -static void utc_web_tab_set_icon_png_p(void) -{ - int ret = -1; - FILE *fp = fopen("/home/capi-web-tab/test.png", "rb"); - if (fp != NULL) { - int length = 0; - unsigned char buffer[3145728]; - length = fread(buffer, 1, 3145728, fp); - if (length > 0) { - ret = bp_tab_adaptor_set_icon_png(g_testcase_id, buffer); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_icon_png failed"); - } else { - dts_fail(__FUNCTION__, "read %d bytes from png", length); - } - fclose(fp); - } else { - dts_fail(__FUNCTION__, "can not open png:%s", strerror(errno)); - } -} - -/** - * @brief Negative test case of bp_tab_adaptor_set_snapshot() - */ -static void utc_web_tab_set_snapshot_n(void) -{ - int ret = bp_tab_adaptor_set_snapshot(-1, 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_snapshot() - */ -static void utc_web_tab_set_snapshot_p(void) -{ - unsigned char *value = (unsigned char *)"icon test"; - int ret = bp_tab_adaptor_set_snapshot(g_testcase_id, 1, 1, (const unsigned char *)value, 9); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_set_snapshot failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_create() - */ -static void utc_web_tab_create_n(void) -{ - int ret = bp_tab_adaptor_create(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_create() - */ -static void utc_web_tab_create_p(void) -{ - int id = -1; - int ret = bp_tab_adaptor_create(&id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_create failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_delete() - */ -static void utc_web_tab_delete_n(void) -{ - int ret = bp_tab_adaptor_delete(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_delete() - */ -static void utc_web_tab_delete_p(void) -{ - int id = -1; - int ret = bp_tab_adaptor_create(&id); - if (ret == 0) - ret = bp_tab_adaptor_delete(id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_create failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_activate() - */ -static void utc_web_tab_activate_n(void) -{ - int ret = bp_tab_adaptor_activate(-1); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_activate() - */ -static void utc_web_tab_activate_p(void) -{ - int ret = bp_tab_adaptor_activate(g_testcase_id); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_activate failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_easy_create() - */ -static void utc_web_tab_easy_create_n(void) -{ - int ret = bp_tab_adaptor_easy_create(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_easy_create() - */ -static void utc_web_tab_easy_create_p(void) -{ - bp_tab_info_fmt info; - memset(&info, 0x00, sizeof(bp_tab_info_fmt)); - info.url = "URL"; - info.title = "TITLE"; - info.date_modified = -1; - int id = -1; - int ret = bp_tab_adaptor_easy_create(&id, &info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_easy_create failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_get_info() - */ -static void utc_web_tab_get_info_n(void) -{ - int ret = bp_tab_adaptor_get_info(-1, 0, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_info() - */ -static void utc_web_tab_get_info_p(void) -{ - unsigned int b_offset = (BP_TAB_O_DATE_CREATED | BP_TAB_O_DATE_MODIFIED | BP_TAB_O_URL | BP_TAB_O_TITLE); - bp_tab_info_fmt info; - memset(&info, 0x00, sizeof(bp_tab_info_fmt)); - int ret = bp_tab_adaptor_get_info(g_testcase_id, b_offset, &info); - bp_tab_adaptor_easy_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_info failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_easy_all() - */ -static void utc_web_tab_get_easy_all_n(void) -{ - int ret = bp_tab_adaptor_get_easy_all(-1, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_easy_all() - */ -static void utc_web_tab_get_easy_all_p(void) -{ - bp_tab_info_fmt info; - memset(&info, 0x00, sizeof(bp_tab_info_fmt)); - int ret = bp_tab_adaptor_get_easy_all(g_testcase_id, &info); - bp_tab_adaptor_easy_free(&info); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_easy_all failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_get_duplicated_ids_p() - */ -static void utc_web_tab_get_duplicated_ids_p_n(void) -{ - int ret = bp_tab_adaptor_get_duplicated_ids_p(NULL, NULL, 0, 0, 0, - 0, 0, NULL, 0); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_get_duplicated_ids_p() - */ -static void utc_web_tab_get_duplicated_ids_p_p(void) -{ - int *ids = NULL; - int ids_count = 0; - int ret = bp_tab_adaptor_get_duplicated_ids_p(&ids, &ids_count, -1, 0, - BP_TAB_O_DATE_CREATED, 0/*ASC*/, BP_TAB_O_TITLE, "%T%", 1); - free(ids); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_duplicated_ids_p failed"); -} - - - - - - - - - -/** - * @brief Negative test case of bp_tab_adaptor_set_data_changed_cb() - */ -static void utc_web_tab_set_data_changed_cb_n(void) -{ - int ret = bp_tab_adaptor_set_data_changed_cb(NULL, NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Positive test case of bp_tab_adaptor_set_data_changed_cb() - */ -static void utc_web_tab_set_data_changed_cb_p(void) -{ - int ret = bp_tab_adaptor_set_data_changed_cb(tab_changed, NULL); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_get_root failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_unset_data_changed_cb() - */ -static void utc_web_tab_unset_data_changed_cb_n(void) -{ - int ret = bp_tab_adaptor_unset_data_changed_cb(NULL); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/**` - * @brief Positive test case of bp_tab_adaptor_get_errorcode() - */ -static void utc_web_tab_unset_data_changed_cb_p(void) -{ - int ret = bp_tab_adaptor_unset_data_changed_cb(tab_changed); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_unset_data_changed_cb failed"); -} - - -/** - * @brief Negative test case of bp_tab_adaptor_is_setted_data_changed_cb() - */ -static void utc_web_tab_is_setted_data_changed_cb_n(void) -{ - int ret = bp_tab_adaptor_unset_data_changed_cb(tab_changed); - if (ret == 0) - ret = bp_tab_adaptor_is_setted_data_changed_cb(); - if (ret < 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "-1 must be returned when parameter is NULL."); -} - -/** - * @brief Negative test case of bp_tab_adaptor_is_setted_data_changed_cb() - */ -static void utc_web_tab_is_setted_data_changed_cb_p(void) -{ - int ret = bp_tab_adaptor_set_data_changed_cb(tab_changed, NULL); - ret = bp_tab_adaptor_is_setted_data_changed_cb(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_is_setted_data_changed_cb failed"); -} - -/** - * @brief Negative test case of bp_tab_adaptor_publish_notification() - */ -static void utc_web_tab_publish_notification_p(void) -{ - int ret = bp_tab_adaptor_publish_notification(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_publish_notification failed"); -} - -/** - * @brief Positive test case of bp_tab_adaptor_clear_dirty_ids() - */ -static void utc_web_tab_clear_dirty_ids_p(void) -{ - int ret = bp_tab_adaptor_clear_dirty_ids(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_clear_dirty_ids failed"); -} - -/** - * @brief Positive test case of bp_tab_adaptor_clear_deleted_ids() - */ -static void utc_web_tab_clear_deleted_ids_p(void) -{ - int ret = bp_tab_adaptor_clear_deleted_ids(); - if (ret == 0) - dts_pass(__FUNCTION__); - else - dts_fail(__FUNCTION__, "bp_tab_adaptor_clear_deleted_ids failed"); -} - - -/** - * @brief Positive test case of bp_tab_adaptor_get_errorcode() - */ -static void utc_web_tab_get_errorcode_p(void) -{ - bp_tab_adaptor_get_errorcode(); - dts_pass(__FUNCTION__); -} - -/** - * @brief Positive test case of bp_tab_adaptor_easy_free() - */ -static void utc_web_tab_easy_free_p(void) -{ - bp_tab_adaptor_easy_free(NULL); - dts_pass(__FUNCTION__); -} - diff --git a/TC/web_tab/tet_scen b/TC/web_tab/tet_scen deleted file mode 100644 index 03f029a..0000000 --- a/TC/web_tab/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/testcase/tslist diff --git a/TC/web_tab/tetbuild.cfg b/TC/web_tab/tetbuild.cfg deleted file mode 100644 index f7eda55..0000000 --- a/TC/web_tab/tetbuild.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option for build operation checking -TET_BUILD_TOOL=make # build with using make command -TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build -TET_API_COMPLIANT=True # use TET API in Test Case ? -TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/web_tab/tetclean.cfg b/TC/web_tab/tetclean.cfg deleted file mode 100644 index 02d7030..0000000 --- a/TC/web_tab/tetclean.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option -TET_CLEAN_TOOL= make clean # clean tool -TET_CLEAN_FILE= Makefile # file for clean -TET_API_COMPLIANT=True # TET API useage -TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/web_tab/tetexec.cfg b/TC/web_tab/tetexec.cfg deleted file mode 100644 index ef3e452..0000000 --- a/TC/web_tab/tetexec.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capturing execution or not -TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional -TET_EXEC_FILE= # ex) exectool : execution file/ Optional -TET_API_COMPLIANT=True # Test case or Tool usesTET API? -TET_PASS_TC_NAME=True # showing Passed TC name ?