TC files are managed in other package separately.
Change-Id: I5bea75f69215e68bd198260b097d5ee0666ffd40
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-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
+++ /dev/null
-#!/bin/sh
-
-. ./config
-
-TC_PATH=/opt/home/$PKG_NAME
-
-echo $TC_PATH
-
-sdb shell "mkdir -p $TC_PATH"
-
-sdb push . $TC_PATH
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-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)
+++ /dev/null
-/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
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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__);
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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__);
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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__);
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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__);
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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));
- }
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark.h>
-
-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");
-}
+++ /dev/null
-all
- ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
- :include:/testcase/tslist
+++ /dev/null
-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?
+++ /dev/null
-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
+++ /dev/null
-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 ?
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-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
+++ /dev/null
-#!/bin/sh
-
-. ./config
-
-TC_PATH=/opt/home/$PKG_NAME
-
-echo $TC_PATH
-
-sdb shell "mkdir -p $TC_PATH"
-
-sdb push . $TC_PATH
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-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)
+++ /dev/null
-/testcase/utc_web_bookmark_csc
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_bookmark_csc.h>
-
-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__);
-}
+++ /dev/null
-all
- ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
- :include:/testcase/tslist
+++ /dev/null
-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?
+++ /dev/null
-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
+++ /dev/null
-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 ?
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-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
+++ /dev/null
-#!/bin/sh
-
-. ./config
-
-TC_PATH=/opt/home/$PKG_NAME
-
-echo $TC_PATH
-
-sdb shell "mkdir -p $TC_PATH"
-
-sdb push . $TC_PATH
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-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)
+++ /dev/null
-/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
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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__);
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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__);
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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__);
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
-
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <tet_api.h>
-#include <web_history.h>
-
-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");
-}
+++ /dev/null
-all
- ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
- :include:/testcase/tslist
+++ /dev/null
-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?
+++ /dev/null
-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
+++ /dev/null
-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 ?
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
+++ /dev/null
-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
+++ /dev/null
-#!/bin/sh
-
-. ./config
-
-TC_PATH=/opt/home/$PKG_NAME
-
-echo $TC_PATH
-
-sdb shell "mkdir -p $TC_PATH"
-
-sdb push . $TC_PATH
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-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)
+++ /dev/null
-/testcase/utc_web_tab
+++ /dev/null
-/*
- * 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 <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-
-#include <tet_api.h>
-#include <web_tab.h>
-
-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__);
-}
-
+++ /dev/null
-all
- ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
- :include:/testcase/tslist
+++ /dev/null
-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?
+++ /dev/null
-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
+++ /dev/null
-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 ?