+++ /dev/null
-/*
- * Copyright (c) 2017-2020 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 <string.h>
-#include <system_settings.h>
-
-#include "sst.h"
-#include "sstt.h"
-
-void unit_test_callback0(system_settings_key_e key, void *user_data) { }
-void unit_test_callback1(system_settings_key_e key, void *user_data) { }
-void unit_test_callback2(system_settings_key_e key, void *user_data) { }
-void unit_test_callback3(system_settings_key_e key, void *user_data) { }
-void unit_test_callback4(system_settings_key_e key, void *user_data) { }
-void unit_test_callback5(system_settings_key_e key, void *user_data) { }
-void unit_test_callback6(system_settings_key_e key, void *user_data) { }
-void unit_test_callback7(system_settings_key_e key, void *user_data) { }
-void unit_test_callback8(system_settings_key_e key, void *user_data) { }
-void unit_test_callback9(system_settings_key_e key, void *user_data) { }
-void unit_test_callback10(system_settings_key_e key, void *user_data) { }
-void unit_test_callback11(system_settings_key_e key, void *user_data) { }
-void unit_test_callback12(system_settings_key_e key, void *user_data) { }
-void unit_test_callback13(system_settings_key_e key, void *user_data) { }
-void unit_test_callback14(system_settings_key_e key, void *user_data) { }
-void unit_test_callback15(system_settings_key_e key, void *user_data) { }
-void unit_test_callback16(system_settings_key_e key, void *user_data) { }
-void unit_test_callback17(system_settings_key_e key, void *user_data) { }
-void unit_test_callback18(system_settings_key_e key, void *user_data) { }
-void unit_test_callback19(system_settings_key_e key, void *user_data) { }
-void unit_test_callback20(system_settings_key_e key, void *user_data) { }
-void unit_test_callback21(system_settings_key_e key, void *user_data) { }
-void unit_test_callback22(system_settings_key_e key, void *user_data) { }
-void unit_test_callback23(system_settings_key_e key, void *user_data) { }
-void unit_test_callback24(system_settings_key_e key, void *user_data) { }
-void unit_test_callback25(system_settings_key_e key, void *user_data) { }
-void unit_test_callback26(system_settings_key_e key, void *user_data) { }
-void unit_test_callback27(system_settings_key_e key, void *user_data) { }
-void unit_test_callback28(system_settings_key_e key, void *user_data) { }
-void unit_test_callback29(system_settings_key_e key, void *user_data) { }
-void unit_test_callback30(system_settings_key_e key, void *user_data) { }
-void unit_test_callback31(system_settings_key_e key, void *user_data) { }
-void unit_test_callback32(system_settings_key_e key, void *user_data) { }
-void unit_test_callback33(system_settings_key_e key, void *user_data) { }
-void unit_test_callback34(system_settings_key_e key, void *user_data) { }
-void unit_test_callback35(system_settings_key_e key, void *user_data) { }
-void unit_test_callback36(system_settings_key_e key, void *user_data) { }
-void unit_test_callback37(system_settings_key_e key, void *user_data) { }
-void unit_test_callback38(system_settings_key_e key, void *user_data) { }
-void unit_test_callback39(system_settings_key_e key, void *user_data) { }
-void unit_test_callback40(system_settings_key_e key, void *user_data) { }
-void unit_test_callback41(system_settings_key_e key, void *user_data) { }
-void unit_test_callback42(system_settings_key_e key, void *user_data) { }
-void unit_test_callback43(system_settings_key_e key, void *user_data) { }
-void unit_test_callback44(system_settings_key_e key, void *user_data) { }
-void unit_test_callback45(system_settings_key_e key, void *user_data) { }
-void unit_test_callback46(system_settings_key_e key, void *user_data) { }
-void unit_test_callback47(system_settings_key_e key, void *user_data) { }
-void unit_test_callback48(system_settings_key_e key, void *user_data) { }
-void unit_test_callback49(system_settings_key_e key, void *user_data) { }
-void unit_test_callback50(system_settings_key_e key, void *user_data) { }
-void unit_test_callback51(system_settings_key_e key, void *user_data) { }
-void unit_test_callback52(system_settings_key_e key, void *user_data) { }
-void unit_test_callback53(system_settings_key_e key, void *user_data) { }
-void unit_test_callback54(system_settings_key_e key, void *user_data) { }
-void unit_test_callback55(system_settings_key_e key, void *user_data) { }
-void unit_test_callback56(system_settings_key_e key, void *user_data) { }
-void unit_test_callback57(system_settings_key_e key, void *user_data) { }
-void unit_test_callback58(system_settings_key_e key, void *user_data) { }
-void unit_test_callback59(system_settings_key_e key, void *user_data) { }
-
-#if 0
-static int my_assert_ret(int retcode)
-{
- if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
- printf("Error!!\n");
- assert(retcode == SYSTEM_SETTINGS_ERROR_NONE);
- }
- return 1;
-}
-
-static int my_assert_ret_eq_bool(int retcode, bool a, bool b)
-{
- if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
- printf("Error!!\n");
- assert(retcode == SYSTEM_SETTINGS_ERROR_NONE);
- assert_eq(a, b);
- }
- return 1;
-}
-#else
-#define my_assert_ret(retcode) do { \
- if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) { \
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE) \
- printf("Error!!(%d)\n", retcode); \
- assert(retcode == SYSTEM_SETTINGS_ERROR_NONE); \
- } \
-} while (0)
-
-#define my_assert_ret_eq_bool(retcode, a, b) do { \
- if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) { \
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE) \
- printf("Error!!\n"); \
- assert(retcode == SYSTEM_SETTINGS_ERROR_NONE); \
- assert_eq(a, b); \
- } \
-} while (0)
-#endif
-
-static char *sst_ringtone_test_files[] = {
- SYS_SETTINGS_TEST_DIR"/Over the horizon.mp3",
- SYS_SETTINGS_TEST_DIR"/big_buck_bunny.mp3",
- SYS_SETTINGS_TEST_DIR"/daliTestVideo.mp3",
- SYS_SETTINGS_TEST_DIR"/sound_5.mp3",
- SYS_SETTINGS_TEST_DIR"/tct-content-tizen-tests_video.mp3"
-};
-
-system_settings_changed_cb get_system_settings_test_callback()
-{
- static system_settings_changed_cb func_array[] = {
- unit_test_callback0,
- unit_test_callback1,
- unit_test_callback2,
- unit_test_callback3,
- unit_test_callback4,
- unit_test_callback5,
- unit_test_callback6,
- unit_test_callback7,
- unit_test_callback8,
- unit_test_callback9,
- unit_test_callback10,
- unit_test_callback11,
- unit_test_callback12,
- unit_test_callback13,
- unit_test_callback14,
- unit_test_callback15,
- unit_test_callback16,
- unit_test_callback17,
- unit_test_callback18,
- unit_test_callback19,
- unit_test_callback20,
- unit_test_callback21,
- unit_test_callback22,
- unit_test_callback23,
- unit_test_callback24,
- unit_test_callback25,
- unit_test_callback26,
- unit_test_callback27,
- unit_test_callback28,
- unit_test_callback29,
- unit_test_callback30,
- unit_test_callback31,
- unit_test_callback32,
- unit_test_callback33,
- unit_test_callback34,
- unit_test_callback35,
- unit_test_callback36,
- unit_test_callback37,
- unit_test_callback38,
- unit_test_callback39,
- unit_test_callback40,
- unit_test_callback41,
- unit_test_callback42,
- unit_test_callback43,
- unit_test_callback44,
- unit_test_callback45,
- unit_test_callback46,
- unit_test_callback47,
- unit_test_callback48,
- unit_test_callback49,
- unit_test_callback50,
- unit_test_callback51,
- unit_test_callback52,
- unit_test_callback53,
- unit_test_callback54,
- unit_test_callback55,
- unit_test_callback56,
- unit_test_callback57,
- unit_test_callback58,
- unit_test_callback59
- };
-
- static int func_num = 0;
- func_num++;
- if (func_num > 61)
- func_num = 0;
- int slot = func_num % 60;
- return func_array[slot];
-}
-
-static bool _callback_called = false;
-static char *new_ringtonepath = SYS_SETTINGS_TEST_DIR "/ringtone_sdk.mp3";
-
-/**
- * @function utc_system_settings_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-RETTYPE utc_system_settings_startup(void)
-{
- RETURN(0);
-}
-
-/**
- * @function utc_system_settings_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-RETTYPE utc_system_settings_cleanup(void)
-{
- RETURN(0);
-}
-
-/**
- * TEST GETTING SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE
- */
-/**
- * @testcase utc_system_settings_get_value_string_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is able to get the property
- */
-RETTYPE utc_system_settings_get_value_string_p1(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-/**
- * TEST GETTING SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY
- */
-/**
- * @testcase utc_system_settings_get_value_string_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY is able to get the property
- */
-RETTYPE utc_system_settings_get_value_string_p2(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-/**
- * TEST GETTING SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE
- */
-/**
- * @testcase utc_system_settings_get_value_string_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to get the property
- */
-RETTYPE utc_system_settings_get_value_string_p3(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-/**
- * TEST GETTING SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE
- */
-/**
- * @testcase utc_system_settings_get_value_string_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE is able to get the property
- */
-RETTYPE utc_system_settings_get_value_string_p4(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-/**
- * TEST SETTING SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN
- */
-/**
- * @testcase utc_system_settings_get_value_string_p5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p5(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_get_value_string_p11
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p11(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_DEVICE_NAME, &value);
- //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_string_p7
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p7(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, &value);
- my_assert_ret(retcode);
- free(value);
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_get_value_string_p6
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEZON is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p6(void)
-{
- char *value = NULL;
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &value);
- my_assert_ret(retcode);
- free(value);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_string_p10
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p10(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value);
- my_assert_ret(retcode);
- if (retcode == SYSTEM_SETTINGS_ERROR_NONE)
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_string_p8
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p8(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &value);
- my_assert_ret(retcode);
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_string_p9
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_string_p9(void)
-{
- char *value = NULL;
-
- int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, &value);
- my_assert_ret(retcode);
- if (retcode == SYSTEM_SETTINGS_ERROR_NONE)
- assert(value != NULL);
- free(value);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_string_n
- * @since_tizen 2.3
- * @description check if system_settings_get_value_string is able to handle invalid parameters.
- */
-RETTYPE utc_system_settings_get_value_string_n(void)
-{
- int retcode = system_settings_get_value_string(-1, NULL);
- //assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- assert(retcode != SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p1(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, &value);
- my_assert_ret(retcode);
- RETURN(0);
-
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p2(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &value);
- my_assert_ret(retcode);
- RETURN(0);
-
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p3(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_LOCK, &value);
- my_assert_ret(retcode);
- RETURN(0);
-
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p4(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &value);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p5
- * @since_tizen 2.3
- * check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p5(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, &value);
- my_assert_ret(retcode);
- RETURN(0);
-
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p6
- * @since_tizen 2.3
- * check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p6(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p7
- * @since_tizen 2.3
- * check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p7(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p8
- * @since_tizen 2.3
- * check if SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p8(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p9
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p9(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p10
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_bool_p10(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_n
- * @since_tizen 2.3
- * @description check if system_settings_get_value_bool is able to handle invalid parameters.
- */
-RETTYPE utc_system_settings_get_value_bool_n(void)
-{
- int retcode = system_settings_get_value_bool(-1, NULL);
- //assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- assert(retcode != SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_int_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_int_p1(void)
-{
- int value = 0;
-
- int retcode = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_int_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_int_p2(void)
-{
- int font_size = 0;
-
- int retcode = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &font_size);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_n
- * @since_tizen 2.3
- * @description check if system_settings_get_value_int is able to handle invalid parameters.
- */
-RETTYPE utc_system_settings_get_value_n(void)
-{
- int retcode = system_settings_get_value_int(-1, NULL);
- //assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
- assert(retcode != SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_int_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_int_p3(void)
-{
- int value;
- int nRetVal = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, &value);
- my_assert_ret(nRetVal);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_get_value_bool_p11
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to get the property
- */
-RETTYPE utc_system_settings_get_value_bool_p11(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_get_value_bool_p12
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to get the property
- */
-RETTYPE utc_system_settings_get_value_bool_p12(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_get_value_bool_p13
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to get the property
- */
-RETTYPE utc_system_settings_get_value_bool_p13(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_get_value_bool_p14
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to get the property
- */
-RETTYPE utc_system_settings_get_value_bool_p14(void)
-{
- bool value = false;
-
- int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, &value);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p1(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p1(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p2(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p2(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p3(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p3(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p4(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_LOCK_SCREEN_unset_changed_cb_p
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_WALLPAPER is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_LOCK_SCREEN_unset_changed_cb_p(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p5(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p4(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p6
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p6(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p5(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE,
- callback, NULL);
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p7
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p7(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p6
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p6(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p8
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p8(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p7
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p7(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p9
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to set callback for getting notification of change
- */
-RETTYPE utc_system_settings_set_changed_cb_p9(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p8
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p8(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p10
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP is able to set callback for getting notification of change
- */
-RETTYPE utc_system_settings_set_changed_cb_p10(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p9
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p9(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p11
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY is able to set callback for getting notification of change
- */
-RETTYPE utc_system_settings_set_changed_cb_p11(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p10
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY is able to set callback for getting notification of change and unset doing
- */
-RETTYPE utc_system_settings_unset_changed_cb_p10(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p12
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p12(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p11
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p11(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p13
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p13(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR
- */
-/**
- * @testcase utc_system_settings_unset_changed_cb_p12
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p12(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p14
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_TIME_CHANGED is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p14(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p13
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_TIME_CHANGED is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_TIME_CHANGED is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p13(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p15
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p15(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_LOCK,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p14
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p14(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_LOCK,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_LOCK);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p16
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p16(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p15
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p15(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p17
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p17(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_TOUCH,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p16
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p16(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_TOUCH,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_TOUCH);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p18
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p18(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p17
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p17(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p19
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p19(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p18
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p18(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p20
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p20(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p19
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p19(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p21
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p21(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p20
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p20(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p22
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p22(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DEVICE_NAME,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p21
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p21(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DEVICE_NAME,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DEVICE_NAME);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p23
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p23(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ENABLED,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p22
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p22(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ENABLED,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ENABLED);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p24
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p24(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p23
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p23(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p25
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p25(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION,
- callback, NULL);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p24
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p24(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-
-
-/**
- * @testcase utc_system_settings_set_value_string_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE is able to get the property
- */
-RETTYPE utc_system_settings_set_value_string_p1(void)
-{
- int ret;
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, new_ringtonepath);
- my_assert_ret(ret);
-
- char *ret_ringtonepath = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &ret_ringtonepath);
- my_assert_ret(ret);
-
- if (ret == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED)
- RETURN(0);
-
- if (ret_ringtonepath != NULL && 0 == strcmp(ret_ringtonepath, new_ringtonepath))
- assert(1);
- else
- assert(0);
-
- RETURN(0);
-}
-
-
-/**
- * TEST SETTING SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN
- */
-/**
- * @testcase utc_system_settings_set_value_string_n2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN is able to set the property in error-case.
- */
-RETTYPE utc_system_settings_set_value_string_n2(void)
-{
- int ret;
- char *wallpaper = NULL;
-
- char *wrong_wallpaper_path = "/wrongpath/aaa.png";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, wrong_wallpaper_path);
- assert(ret != SYSTEM_SETTINGS_ERROR_NONE);
-
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &wallpaper);
- assert(ret == SYSTEM_SETTINGS_ERROR_NONE);
- free(wallpaper);
- RETURN(0);
-}
-
-/**
- * SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN
- */
-/**
- * @testcase utc_system_settings_set_value_string_n3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN is able to set the property in error-case.
- */
-RETTYPE utc_system_settings_set_value_string_n3(void)
-{
- int ret;
- char *wallpaper = NULL;
-
- char *wrong_wallpaper_path = "/wrongpath/aaa.png";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, wrong_wallpaper_path);
- assert(ret != SYSTEM_SETTINGS_ERROR_NONE);
-
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &wallpaper);
- //assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE);
- free(wallpaper);
- RETURN(0);
-}
-
-/**
- * SYSTEM_SETTINGS_KEY_FONT_TYPE
- */
-/**
- * @testcase utc_system_settings_set_value_string_n4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_FONT_TYPE is able to set the property in error-case.
- */
-RETTYPE utc_system_settings_set_value_string_n4(void)
-{
- int ret;
-
- char *wrong_font_name = "WrongFontName";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, wrong_font_name);
- assert(ret != SYSTEM_SETTINGS_ERROR_NONE);
-
- char *font_name_set = "BreezeSans";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, font_name_set);
- assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE);
-
- char *font_name = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &font_name);
- assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE);
- free(font_name);
- RETURN(0);
-}
-
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_n1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION is able to set the property in a normal-case.
- */
-RETTYPE utc_system_settings_set_value_bool_n1(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, &cur_state);
- my_assert_ret(ret);
-
- /* not support to set value */
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, state);
- my_assert_ret(ret);
-
-
- assert(state != cur_state);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_n2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_bool_n2(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &cur_state);
- my_assert_ret(ret);
-
-
- /* not support to set value */
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, state);
- my_assert_ret(ret);
-
- assert(state != cur_state);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_n3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_MOTION_ENABLED is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_bool_n3(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, &cur_state);
- my_assert_ret(ret);
-
-
- /* not support to set value */
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, state);
- my_assert_ret(ret);
-
- assert(state != cur_state);
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_n4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_SOUND_TOUCH is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_bool_n4(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, &cur_state);
- my_assert_ret(ret);
-
- /* not support to set value */
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, state);
- my_assert_ret(ret);
-
- assert(state != cur_state);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_n5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_SOUND_LOCK is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_bool_n5(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_LOCK, &cur_state);
- my_assert_ret(ret);
-
-
- /* not support to set value */
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_SOUND_LOCK, state);
- my_assert_ret(ret);
-
- assert(state != cur_state);
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_string_n8
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_string_n8(void)
-{
- int ret;
- char *new_font = "DefaultFontName";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE, new_font);
- //my_assert_ret(ret);
- assert_neq(ret, SYSTEM_SETTINGS_ERROR_NONE);
-
- char *ret_font = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE, &ret_font);
- assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_string_n7
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_string_n7(void)
-{
- int ret;
- char *new_zone = "Asia/Seoul";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, new_zone);
- my_assert_ret(ret);
-
- char *ret_device = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &ret_device);
- my_assert_ret(ret);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_int_n1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_TIME_CHANGED is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_TIME_CHANGED is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_int_n1(void)
-{
- int ret;
- int value = 3600;
- ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_TIME_CHANGED, value);
- my_assert_ret(ret);
-
- int time_changed;
- ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TIME_CHANGED, &time_changed);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * SYSTEM_SETTINGS_KEY_DEVICE_NAME
- * check_SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API
- */
-/**
- * @testcase utc_system_settings_set_value_string_n5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_DEVICE_NAME is able to set the property in an exceptional-case. (not supported)
- */
-RETTYPE utc_system_settings_set_value_string_n5(void)
-{
- int ret;
- char *new_device = "Tizen222";
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_DEVICE_NAME, new_device);
- my_assert_ret(ret);
-
- char *ret_device = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_DEVICE_NAME, &ret_device);
-
- if (ret_device != NULL && 0 == strcmp(ret_device, new_device))
- assert(0);
- else
- assert(1);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_string_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE is able to set the property in a normal-case.
- */
-RETTYPE utc_system_settings_set_value_string_p2(void)
-{
- int ret;
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, new_ringtonepath);
- my_assert_ret(ret);
-
- char *ret_ringtonepath = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, &ret_ringtonepath);
-
- if (ret == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED)
- RETURN(0);
-
- if (ret_ringtonepath != NULL && 0 == strcmp(ret_ringtonepath, new_ringtonepath))
- assert(1);
- else
- assert(0);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_string_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY is able to set the property in a normal-case.
- */
-RETTYPE utc_system_settings_set_value_string_p3(void)
-{
- int ret;
- char *new_country = "ko_KR";
-
- /* backup */
- char *backup = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &backup);
- my_assert_ret(ret);
-
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, new_country);
- my_assert_ret(ret);
-
- char *ret_country = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &ret_country);
- my_assert_ret(ret);
-
- if (ret_country != NULL && 0 == strcmp(ret_country, new_country))
- assert(1);
- else
- assert(0);
-
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, backup);
- my_assert_ret(ret);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_string_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE is able to set the property in a normal-case.
- */
-RETTYPE utc_system_settings_set_value_string_p4(void)
-{
- int ret;
- char *new_country = "ko_KR";
-
- /* backup */
- char *backup = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &backup);
- my_assert_ret(ret);
-
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, new_country);
- my_assert_ret(ret);
-
- char *ret_country = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &ret_country);
- my_assert_ret(ret);
-
- if (ret_country != NULL && 0 == strcmp(ret_country, new_country)) {
- assert(1);
- } else {
- printf("ret:%s new:%s not same\n", ret_country, new_country);
- assert(0);
- }
-
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, backup);
- my_assert_ret(ret);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p1(void)
-{
- int ret;
-
- bool ret_state = false;
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p2(void)
-{
- int ret;
-
- bool ret_state = false;
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_n
- * @since_tizen 2.3
- * @description check if system_settings_set_changed_cb is able to handle invalid parameters.
- */
-RETTYPE utc_system_settings_set_changed_cb_n(void)
-{
- int retcode = system_settings_set_changed_cb(-1, NULL, NULL);
- assert(retcode != SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-
-/**
- * @testcase utc_system_settings_get_value_int_p4
- * @since_tizen 3.0
- * @description check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE is able to get the property.
- */
-RETTYPE utc_system_settings_get_value_int_p4(void)
-{
- int value = 0;
- int nRetVal = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE, &value);
- my_assert_ret(nRetVal);
- RETURN(0);
-}
-
-
-
-/**
- * @testcase utc_system_settings_set_value_int_p1
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_int_p1(void)
-{
- int nRetVal = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, 30);
- my_assert_ret(nRetVal);
-
- int value;
- nRetVal = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, &value);
- //assert_eq(value, 30);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_int_n2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME is able to set the properties with exceptional cases.
- */
-RETTYPE utc_system_settings_set_value_int_n2(void)
-{
- int ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, -5);
- assert(ret == SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
-
- ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, 601);
- assert(ret == SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
-
- ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, 0);
- assert(ret == SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p3
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p3(void)
-{
- int ret;
-
- bool ret_state = false;
- bool cur_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p4
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p4(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p5
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p5(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p6
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_VIBRATION is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_VIBRATION is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p6(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_p7
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p7(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_bool_p8
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p8(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_p9
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p9(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_p10
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p10(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_p11
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS is able to get the property.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS is able to set the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p11(void)
-{
- int ret;
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, &cur_state);
- my_assert_ret(ret);
-
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_bool_p12
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_bool_p12(void)
-{
- int ret;
-
- /* get current state */
- bool cur_state = false;
- bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, &cur_state);
- my_assert_ret(ret);
-
- bool state = !cur_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, state);
- my_assert_ret(ret);
-
- /* check current state */
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, &ret_state);
- my_assert_ret_eq_bool(ret, state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, cur_state);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_value_int_p2
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_FONT_SIZE is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_int_p2(void)
-{
- int ret = -1;
- int backup;
- int arr[] = {
- SYSTEM_SETTINGS_FONT_SIZE_SMALL,
- SYSTEM_SETTINGS_FONT_SIZE_NORMAL,
- SYSTEM_SETTINGS_FONT_SIZE_LARGE,
- SYSTEM_SETTINGS_FONT_SIZE_HUGE,
- SYSTEM_SETTINGS_FONT_SIZE_GIANT
- };
-
- unsigned int next_val = time(NULL);
- int size = sizeof(arr) / sizeof(arr[0]);
- int sel = rand_r(&next_val) % size;
-
- /* backup */
- ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &backup);
- my_assert_ret(ret);
-
- /* change font at random */
- ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, sel);
- my_assert_ret(ret);
-
- /* check if selection and result are identical. */
- int after;
- ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &after);
- //assert_eq(sel, after);
-
- /* roll back to backup */
- ret = system_settings_set_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, backup);
- my_assert_ret(ret);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_value_string_n6
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to set the property.
- * check if SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION is able to get the property.
- */
-RETTYPE utc_system_settings_set_value_string_n6(void)
-{
- int ret;
- ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, new_ringtonepath);
- my_assert_ret(ret);
- //assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE);
-
- char *ret_ringtonepath = NULL;
- ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, &ret_ringtonepath);
-
- if (ret_ringtonepath != NULL && 0 == strcmp(ret_ringtonepath, new_ringtonepath))
- my_assert_ret(0);
- else
- my_assert_ret(1);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_n
- * @since_tizen 2.3
- * @description check if system_settings_unset_changed_cb is able to handle invalid parameters.
- */
-RETTYPE utc_system_settings_unset_changed_cb_n(void)
-{
- int retcode = system_settings_unset_changed_cb(-1);
- assert(retcode != SYSTEM_SETTINGS_ERROR_NONE);
- RETURN(0);
-}
-
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p27
- * @since_tizen 3.0
- * @description check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p27(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p26
- * @since_tizen 3.0
- * @description check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p26(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p29
- * @since_tizen 3.0
- * @description check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p29(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p28
- * @since_tizen 3.0
- * @description check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p28(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p31
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p31(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p30
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p30(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p33
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_VIBRATION is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p33(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_VIBRATION,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p32
- * @since_tizen 2.3
- * @description check if SYSTEM_SETTINGS_KEY_VIBRATION is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_VIBRATION is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p32(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_VIBRATION,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_VIBRATION);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-static bool system_setting_get_ringtone_list_cb(int index, const char* data, void *user_data)
-{
- int *ringtone_num = user_data;
- *ringtone_num += 1;
- return true;
-}
-
-RETTYPE utc_system_settings_add_ringtone_list_p1(void)
-{
- int retcode = -1;
- int files_cnt = sizeof(sst_ringtone_test_files)/sizeof(char*);
- int ringtone_num = 0;
- for (int i = 0; i < files_cnt; i++) {
- retcode = system_settings_add_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, sst_ringtone_test_files[i]);
- my_assert_ret(retcode);
- }
- retcode = system_settings_foreach_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, system_setting_get_ringtone_list_cb, &ringtone_num);
- my_assert_ret(retcode);
- for (int i = files_cnt - 1; i >= 0; i--) {
- retcode = system_settings_delete_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, sst_ringtone_test_files[i]);
- my_assert_ret(retcode);
- }
- assert_eq(ringtone_num, files_cnt + 1);
- RETURN(0);
-}
-
-RETTYPE utc_system_settings_delete_ringtone_list_p1(void)
-{
- int retcode = -1;
- int files_cnt = sizeof(sst_ringtone_test_files)/sizeof(char*);
- for (int i = 0; i < files_cnt; i++) {
- retcode = system_settings_add_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, sst_ringtone_test_files[i]);
- my_assert_ret(retcode);
- }
- for (int i = files_cnt - 1; i >= 0; i--) {
- retcode = system_settings_delete_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, sst_ringtone_test_files[i]);
- my_assert_ret(retcode);
- }
- RETURN(0);
-}
-
-#include <unistd.h> /* to use sleep */
-typedef struct __in_callback_test {
- int call_cnt1;
- int call_cnt2;
-} __in_callback_data;
-
-static void utc_system_settings_changed_multi_callback1(system_settings_key_e key, void *user_data)
-{
- __in_callback_data *cb_data = (__in_callback_data*)user_data;
- if (!cb_data)
- return;
- cb_data->call_cnt1++;
-}
-
-static void utc_system_settings_changed_multi_callback2(system_settings_key_e key, void *user_data)
-{
- __in_callback_data *cb_data = (__in_callback_data*)user_data;
- if (!cb_data)
- return;
- cb_data->call_cnt2++;
-}
-
-static gpointer test_multi_callback_thread(gpointer arg)
-{
- int retcode = system_settings_add_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- utc_system_settings_changed_multi_callback1, arg);
- my_assert_ret(retcode);
-
- retcode = system_settings_add_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- utc_system_settings_changed_multi_callback1, arg);
-
- /* not support same callback about 1 system-settings key */
- assert_eq(retcode, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
-
- retcode = system_settings_add_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- utc_system_settings_changed_multi_callback2, arg);
-
- bool bk_state = false;
- system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &bk_state);
-
- bool state = true;
- system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, state);
-
- sleep(1);
-
- my_assert_ret(retcode);
- retcode = system_settings_remove_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- utc_system_settings_changed_multi_callback1);
- my_assert_ret(retcode);
- retcode = system_settings_remove_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
- utc_system_settings_changed_multi_callback2);
- my_assert_ret(retcode);
-
- system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, bk_state);
-
- return 0;
-
-}
-/**
- * @testcase utc_system_settings_add_changed_cb_p1
- * @since_tizen 4.0
- * @description check if SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_add_changed_cb_p1(void)
-{
- __in_callback_data *cb_data = calloc(sizeof(__in_callback_data), 1);
- GThread *test_thread;
-
- test_thread = g_thread_new(NULL, test_multi_callback_thread, cb_data);
-
- g_thread_join(test_thread);
- assert_eq(cb_data->call_cnt1, 1);
- assert_eq(cb_data->call_cnt2, 1);
- if (cb_data)
- free(cb_data);
-
- RETURN(0);
-}
-
-
-RETTYPE utc_system_settings_changed_callback_1(system_settings_key_e key, void *user_data)
-{
- _callback_called = true;
-}
-
-RETTYPE utc_system_settings_changed_callback_2(system_settings_key_e key, void *user_data)
-{
- _callback_called = true;
-}
-
-RETTYPE utc_system_settings_add_remove_changed_cb_p1(void)
-{
- int retcode = 0;
- int key_idx = 0;
-
- for (key_idx = SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE; key_idx < SYSTEM_SETTINGS_KEY_MAX; key_idx++) {
- system_settings_changed_cb callback_1 = get_system_settings_test_callback();
- system_settings_changed_cb callback_2 = get_system_settings_test_callback();
-
- if (key_idx == SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED + 1)
- continue; /* skip removed system-setting key */
-
- if (key_idx == SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE)
- continue; /* skip not supported notification callback of system-setting key */
-
- retcode = system_settings_add_changed_cb(key_idx,
- callback_1, NULL);
-
- if (retcode == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
- assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
- } else {
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
- printf("ERROR !! key =%d , ret = %d\n", key_idx, retcode);
- }
-
- retcode = system_settings_remove_changed_cb(key_idx,
- callback_1);
-
- if (retcode == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
- assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
- } else {
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
- printf("ERROR !! key =%d , ret = %d\n", key_idx, retcode);
- }
-
- retcode = system_settings_add_changed_cb(key_idx,
- callback_1, NULL);
- my_assert_ret(retcode);
-
- retcode = system_settings_add_changed_cb(key_idx,
- callback_2, NULL);
- my_assert_ret(retcode);
-
- retcode = system_settings_remove_changed_cb(key_idx,
- callback_1);
- my_assert_ret(retcode);
-
- retcode = system_settings_remove_changed_cb(key_idx,
- callback_2);
- my_assert_ret(retcode);
- }
-
- RETURN(0);
-}
-
-RETTYPE utc_system_settings_ads_id_p1(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = 0;
- char *ret_ads_id = NULL;
- retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_ADS_ID, &ret_ads_id);
-
- char *set_ads_id = "00000215-0156-0133-0034-000000000102";
- retcode = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_ADS_ID, set_ads_id);
- my_assert_ret(retcode);
-
- system_settings_set_value_string(SYSTEM_SETTINGS_KEY_ADS_ID, ret_ads_id);
- if (ret_ads_id)
- free(ret_ads_id);
-
- retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ADS_ID,
- callback, NULL);
- my_assert_ret(retcode);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ADS_ID);
- my_assert_ret(retcode);
- RETURN(0);
-}
-
-RETTYPE utc_system_settings_lock_screen_app_p1(void)
-{
- int retcode = 0;
- char *ret_lock_screen_id = NULL;
- retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, &ret_lock_screen_id);
-
- char *set_lock_screen_id = "org.tizen.voice-control-panel";
- retcode = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, set_lock_screen_id);
- my_assert_ret(retcode);
-
- system_settings_set_value_string(SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, ret_lock_screen_id);
- if (ret_lock_screen_id)
- free(ret_lock_screen_id);
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p35
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p35(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p34
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p34(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p37
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p37(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p36
- * @since_tizen 5.0
- * @description check if SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p36(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p39
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p39(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p38
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p38(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p41
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p41(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p40
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p40(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-/**
- * @testcase utc_system_settings_set_changed_cb_p43
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to set the callback for change-notification.
- */
-RETTYPE utc_system_settings_set_changed_cb_p43(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED,
- callback, NULL);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-
-/**
- * @testcase utc_system_settings_unset_changed_cb_p42
- * @since_tizen 5.5
- * @description check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to set the callback for change-notification.
- * check if SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED is able to unset the callback for change-notification.
- */
-RETTYPE utc_system_settings_unset_changed_cb_p42(void)
-{
- system_settings_changed_cb callback = get_system_settings_test_callback();
- int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED,
- callback, NULL);
-
- retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED);
- my_assert_ret(retcode);
-
- RETURN(0);
-}
-
-void unittest_api()
-{
- /* hook up your test functions */
- g_test_add_func("/utc_system_settings_add_changed_cb_p1", utc_system_settings_add_changed_cb_p1);
- g_test_add_func("/utc_system_settings_add_remove_changed_cb_p1", utc_system_settings_add_remove_changed_cb_p1);
- g_test_add_func("/utc_system_settings_ads_id_p1", utc_system_settings_ads_id_p1);
- add_test_func("/utc_system_settings_lock_screen_app_p1", utc_system_settings_lock_screen_app_p1);
- add_test_func("/utc_system_settings_get_value_string_p1", utc_system_settings_get_value_string_p1);
- add_test_func("/utc_system_settings_get_value_string_p2", utc_system_settings_get_value_string_p2);
- add_test_func("/utc_system_settings_get_value_string_p3", utc_system_settings_get_value_string_p3);
- add_test_func("/utc_system_settings_get_value_string_p4", utc_system_settings_get_value_string_p4);
- add_test_func("/utc_system_settings_get_value_string_p5", utc_system_settings_get_value_string_p5);
- add_test_func("/utc_system_settings_get_value_string_p7", utc_system_settings_get_value_string_p7);
- add_test_func("/utc_system_settings_get_value_string_p6", utc_system_settings_get_value_string_p6);
- add_test_func("/utc_system_settings_get_value_string_p10", utc_system_settings_get_value_string_p10);
- add_test_func("/utc_system_settings_get_value_string_p8", utc_system_settings_get_value_string_p8);
- add_test_func("/utc_system_settings_get_value_string_p9", utc_system_settings_get_value_string_p9);
- add_test_func("/utc_system_settings_get_value_string_p11", utc_system_settings_get_value_string_p11);
- add_test_func("/utc_system_settings_get_value_string_n", utc_system_settings_get_value_string_n);
- add_test_func("/utc_system_settings_get_value_bool_p1", utc_system_settings_get_value_bool_p1);
- add_test_func("/utc_system_settings_get_value_bool_p2", utc_system_settings_get_value_bool_p2);
- add_test_func("/utc_system_settings_get_value_bool_p3", utc_system_settings_get_value_bool_p3);
- add_test_func("/utc_system_settings_get_value_bool_p4", utc_system_settings_get_value_bool_p4);
- add_test_func("/utc_system_settings_get_value_bool_p5", utc_system_settings_get_value_bool_p5);
- add_test_func("/utc_system_settings_get_value_bool_p6", utc_system_settings_get_value_bool_p6);
- add_test_func("/utc_system_settings_get_value_bool_p7", utc_system_settings_get_value_bool_p7);
- add_test_func("/utc_system_settings_get_value_bool_p8", utc_system_settings_get_value_bool_p8);
- add_test_func("/utc_system_settings_get_value_bool_p9", utc_system_settings_get_value_bool_p9);
- add_test_func("/utc_system_settings_get_value_bool_p10", utc_system_settings_get_value_bool_p10);
- add_test_func("/utc_system_settings_get_value_bool_p11", utc_system_settings_get_value_bool_p11);
- add_test_func("/utc_system_settings_get_value_bool_p12", utc_system_settings_get_value_bool_p12);
- add_test_func("/utc_system_settings_get_value_bool_p13", utc_system_settings_get_value_bool_p13);
- add_test_func("/utc_system_settings_get_value_bool_p14", utc_system_settings_get_value_bool_p14);
- add_test_func("/utc_system_settings_get_value_bool_n", utc_system_settings_get_value_bool_n);
- add_test_func("/utc_system_settings_get_value_int_p1", utc_system_settings_get_value_int_p1);
- add_test_func("/utc_system_settings_get_value_int_p2", utc_system_settings_get_value_int_p2);
- add_test_func("/utc_system_settings_get_value_n", utc_system_settings_get_value_n);
- add_test_func("/utc_system_settings_get_value_int_p3", utc_system_settings_get_value_int_p3);
- add_test_func("/utc_system_settings_get_value_int_p4", utc_system_settings_get_value_int_p4);
- g_test_add_func("/utc_system_settings_set_value_string_n2", utc_system_settings_set_value_string_n2);
- g_test_add_func("/utc_system_settings_set_value_string_n3", utc_system_settings_set_value_string_n3);
- g_test_add_func("/utc_system_settings_set_value_string_n4", utc_system_settings_set_value_string_n4);
- add_test_func("/utc_system_settings_set_value_string_n5", utc_system_settings_set_value_string_n5);
- g_test_add_func("/utc_system_settings_set_value_string_n7", utc_system_settings_set_value_string_n7);
- add_test_func("/utc_system_settings_set_value_string_n8", utc_system_settings_set_value_string_n8);
- g_test_add_func("/utc_system_settings_set_changed_cb_p1", utc_system_settings_set_changed_cb_p1);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p1", utc_system_settings_unset_changed_cb_p1);
- g_test_add_func("/utc_system_settings_set_changed_cb_p2", utc_system_settings_set_changed_cb_p2);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p2", utc_system_settings_unset_changed_cb_p2);
- g_test_add_func("/utc_system_settings_set_changed_cb_p3", utc_system_settings_set_changed_cb_p3);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p3", utc_system_settings_unset_changed_cb_p3);
- g_test_add_func("/utc_system_settings_set_changed_cb_p4", utc_system_settings_set_changed_cb_p4);
- g_test_add_func("/utc_system_settings_LOCK_SCREEN_unset_changed_cb_p", utc_system_settings_LOCK_SCREEN_unset_changed_cb_p);
- g_test_add_func("/utc_system_settings_set_changed_cb_p5", utc_system_settings_set_changed_cb_p5);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p4", utc_system_settings_unset_changed_cb_p4);
- g_test_add_func("/utc_system_settings_set_changed_cb_p6", utc_system_settings_set_changed_cb_p6);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p5", utc_system_settings_unset_changed_cb_p5);
- g_test_add_func("/utc_system_settings_set_changed_cb_p7", utc_system_settings_set_changed_cb_p7);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p6", utc_system_settings_unset_changed_cb_p6);
- g_test_add_func("/utc_system_settings_set_changed_cb_p8", utc_system_settings_set_changed_cb_p8);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p7", utc_system_settings_unset_changed_cb_p7);
- g_test_add_func("/utc_system_settings_set_changed_cb_p9", utc_system_settings_set_changed_cb_p9);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p8", utc_system_settings_unset_changed_cb_p8);
- g_test_add_func("/utc_system_settings_set_changed_cb_p10", utc_system_settings_set_changed_cb_p10);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p9", utc_system_settings_unset_changed_cb_p9);
- g_test_add_func("/utc_system_settings_set_changed_cb_p11", utc_system_settings_set_changed_cb_p11);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p10", utc_system_settings_unset_changed_cb_p10);
- g_test_add_func("/utc_system_settings_set_changed_cb_p12", utc_system_settings_set_changed_cb_p12);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p11", utc_system_settings_unset_changed_cb_p11);
- g_test_add_func("/utc_system_settings_set_changed_cb_p13", utc_system_settings_set_changed_cb_p13);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p12", utc_system_settings_unset_changed_cb_p12);
- g_test_add_func("/utc_system_settings_set_changed_cb_p14", utc_system_settings_set_changed_cb_p14);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p13", utc_system_settings_unset_changed_cb_p13);
- g_test_add_func("/utc_system_settings_set_changed_cb_p15", utc_system_settings_set_changed_cb_p15);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p14", utc_system_settings_unset_changed_cb_p14);
- g_test_add_func("/utc_system_settings_set_changed_cb_p16", utc_system_settings_set_changed_cb_p16);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p15", utc_system_settings_unset_changed_cb_p15);
- g_test_add_func("/utc_system_settings_set_changed_cb_p17", utc_system_settings_set_changed_cb_p17);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p16", utc_system_settings_unset_changed_cb_p16);
- g_test_add_func("/utc_system_settings_set_changed_cb_p18", utc_system_settings_set_changed_cb_p18);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p17", utc_system_settings_unset_changed_cb_p17);
- g_test_add_func("/utc_system_settings_set_changed_cb_p19", utc_system_settings_set_changed_cb_p19);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p18", utc_system_settings_unset_changed_cb_p18);
- g_test_add_func("/utc_system_settings_set_changed_cb_p20", utc_system_settings_set_changed_cb_p20);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p19;", utc_system_settings_unset_changed_cb_p19);
- g_test_add_func("/utc_system_settings_set_changed_cb_p21", utc_system_settings_set_changed_cb_p21);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p20", utc_system_settings_unset_changed_cb_p20);
- g_test_add_func("/utc_system_settings_set_changed_cb_p22", utc_system_settings_set_changed_cb_p22);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p21", utc_system_settings_unset_changed_cb_p21);
- g_test_add_func("/utc_system_settings_set_changed_cb_p23", utc_system_settings_set_changed_cb_p23);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p22", utc_system_settings_unset_changed_cb_p22);
- g_test_add_func("/utc_system_settings_set_changed_cb_p24", utc_system_settings_set_changed_cb_p24);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p23", utc_system_settings_unset_changed_cb_p23);
- g_test_add_func("/utc_system_settings_set_changed_cb_p25", utc_system_settings_set_changed_cb_p25);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p24", utc_system_settings_unset_changed_cb_p24);
- g_test_add_func("/utc_system_settings_set_changed_cb_p27", utc_system_settings_set_changed_cb_p27);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p26", utc_system_settings_unset_changed_cb_p26);
- g_test_add_func("/utc_system_settings_set_changed_cb_p29", utc_system_settings_set_changed_cb_p29);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p28", utc_system_settings_unset_changed_cb_p28);
- g_test_add_func("/utc_system_settings_set_changed_cb_p31", utc_system_settings_set_changed_cb_p31);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p30", utc_system_settings_unset_changed_cb_p30);
- g_test_add_func("/utc_system_settings_set_changed_cb_p33", utc_system_settings_set_changed_cb_p33);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p32", utc_system_settings_unset_changed_cb_p32);
- g_test_add_func("/utc_system_settings_set_changed_cb_p35", utc_system_settings_set_changed_cb_p35);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p34", utc_system_settings_unset_changed_cb_p34);
- g_test_add_func("/utc_system_settings_set_changed_cb_p37", utc_system_settings_set_changed_cb_p37);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p36", utc_system_settings_unset_changed_cb_p36);
- g_test_add_func("/utc_system_settings_set_changed_cb_p39", utc_system_settings_set_changed_cb_p39);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p38", utc_system_settings_unset_changed_cb_p38);
- g_test_add_func("/utc_system_settings_set_changed_cb_p41", utc_system_settings_set_changed_cb_p41);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p40", utc_system_settings_unset_changed_cb_p40);
- g_test_add_func("/utc_system_settings_set_changed_cb_p43", utc_system_settings_set_changed_cb_p43);
- g_test_add_func("/utc_system_settings_unset_changed_cb_p42", utc_system_settings_unset_changed_cb_p42);
- g_test_add_func("/utc_system_settings_add_ringtone_list_p1", utc_system_settings_add_ringtone_list_p1);
- g_test_add_func("/utc_system_settings_delete_ringtone_list_p1", utc_system_settings_delete_ringtone_list_p1);
- add_test_func("/utc_system_settings_set_value_string_p1", utc_system_settings_set_value_string_p1);
- add_test_func("/utc_system_settings_set_value_string_p2", utc_system_settings_set_value_string_p2);
- g_test_add_func("/utc_system_settings_set_value_string_p3", utc_system_settings_set_value_string_p3);
- g_test_add_func("/utc_system_settings_set_value_string_p4", utc_system_settings_set_value_string_p4);
- add_test_func("/utc_system_settings_set_value_bool_n1", utc_system_settings_set_value_bool_n1);
- add_test_func("/utc_system_settings_set_value_bool_n4", utc_system_settings_set_value_bool_n4);
- add_test_func("/utc_system_settings_set_value_bool_n5", utc_system_settings_set_value_bool_n5);
- add_test_func("/utc_system_settings_set_value_bool_p1", utc_system_settings_set_value_bool_p1);
- add_test_func("/utc_system_settings_set_value_bool_p2", utc_system_settings_set_value_bool_p2);
- add_test_func("/utc_system_settings_set_value_int_n1", utc_system_settings_set_value_int_n1);
- g_test_add_func("/utc_system_settings_set_changed_cb_n", utc_system_settings_set_changed_cb_n);
- add_test_func("/utc_system_settings_set_value_int_p1", utc_system_settings_set_value_int_p1);
- add_test_func("/utc_system_settings_set_value_int_n2", utc_system_settings_set_value_int_n2);
- add_test_func("/utc_system_settings_set_value_bool_p3", utc_system_settings_set_value_bool_p3);
- add_test_func("/utc_system_settings_set_value_bool_p4", utc_system_settings_set_value_bool_p4);
- add_test_func("/utc_system_settings_set_value_bool_p5", utc_system_settings_set_value_bool_p5);
- add_test_func("/utc_system_settings_set_value_bool_p6", utc_system_settings_set_value_bool_p6);
- add_test_func("/utc_system_settings_set_value_bool_p7", utc_system_settings_set_value_bool_p7);
- add_test_func("/utc_system_settings_set_value_bool_p8", utc_system_settings_set_value_bool_p8);
- add_test_func("/utc_system_settings_set_value_bool_p9", utc_system_settings_set_value_bool_p9);
- add_test_func("/utc_system_settings_set_value_bool_p10", utc_system_settings_set_value_bool_p10);
- add_test_func("/utc_system_settings_set_value_bool_p11", utc_system_settings_set_value_bool_p11);
- add_test_func("/utc_system_settings_set_value_bool_p12", utc_system_settings_set_value_bool_p12);
- add_test_func("/utc_system_settings_set_value_int_p2", utc_system_settings_set_value_int_p2);
- add_test_func("/utc_system_settings_set_value_string_n6", utc_system_settings_set_value_string_n6);
- g_test_add_func("/utc_system_settings_unset_changed_cb_n", utc_system_settings_unset_changed_cb_n);
-}