[ITC][base-utils][ACR-804][Added new API for timezone]
authorShashank Shekhar Shukla <shekhar1.s@samsung.com>
Wed, 23 Nov 2016 11:38:28 +0000 (17:08 +0530)
committershobhit verma <shobhit.v@samsung.com>
Fri, 25 Nov 2016 09:58:10 +0000 (01:58 -0800)
Change-Id: I298b39a0d7219f072871e652c49fcc24dd61d09b
Signed-off-by: Shashank Shekhar Shukla <shekhar1.s@samsung.com>
src/itc/base-utils/ITs-base-utils-timezone.c
src/itc/base-utils/tct-base-utils-native_common_iot.h
src/itc/base-utils/tct-base-utils-native_mobile.h
src/itc/base-utils/tct-base-utils-native_wearable.h

index 65ee63b..2e2e95d 100755 (executable)
@@ -1079,6 +1079,34 @@ int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void)
        return 0;
 }
 
+//& type: auto
+//& purpose: Gets the time zone from the current host system configuration.
+/**
+* @testcase                            ITc_i18n_timezone_detect_host_timezone_p
+* @since_tizen                         3.0
+* @author              SRID(shekhar1.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @scenario                            Gets the time zone from the current host system configuration
+* @apitarget                   i18n_timezone_detect_host_timezone
+* @apicovered                  i18n_timezone_detect_host_timezone
+* @passcase                            When i18n_timezone_detect_host_timezone is successful
+* @failcase                            If target i18n_timezone_detect_host_timezone API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_detect_host_timezone_p(void)
+{
+       START_TEST;
+
+       i18n_timezone_h nTimeZone = NULL;
+
+       int nRetVal = i18n_timezone_detect_host_timezone( &nTimeZone );
+       PRINT_RESULT(I18N_ERROR_NONE, nRetVal, "i18n_timezone_detect_host_timezone", BaseUtilsGetError(nRetVal));
+       CHECK_HANDLE(nTimeZone, "i18n_timezone_detect_host_timezone");
+
+       return 0;
+}
 
 /** @} */
 /** @} */
index 7889efa..2fc7132 100755 (executable)
@@ -96,6 +96,7 @@ extern int ITc_i18n_timezone_foreach_timezone_id_by_region_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_with_offset_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void);
+extern int ITc_i18n_timezone_detect_host_timezone_p(void);
 extern int ITc_i18n_ubrk_create_destroy_p(void);
 extern int ITc_i18n_ubrk_create_rules_p(void);
 extern int ITc_i18n_ubrk_safe_clone_p(void);
@@ -584,6 +585,7 @@ testcase tc_array[] = {
     {"ITc_i18n_timezone_foreach_timezone_id_p",ITc_i18n_timezone_foreach_timezone_id_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_with_offset_p",ITc_i18n_timezone_foreach_timezone_id_with_offset_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_by_country_p",ITc_i18n_timezone_foreach_timezone_id_by_country_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
+       {"ITc_i18n_timezone_detect_host_timezone_p", ITc_i18n_timezone_detect_host_timezone_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_ubrk_create_destroy_p",ITc_i18n_ubrk_create_destroy_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_create_rules_p",ITc_i18n_ubrk_create_rules_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_safe_clone_p",ITc_i18n_ubrk_safe_clone_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
index a008732..b90df9e 100755 (executable)
@@ -96,6 +96,7 @@ extern int ITc_i18n_timezone_foreach_timezone_id_by_region_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_with_offset_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void);
+extern int ITc_i18n_timezone_detect_host_timezone_p(void);
 extern int ITc_i18n_ubrk_create_destroy_p(void);
 extern int ITc_i18n_ubrk_create_rules_p(void);
 extern int ITc_i18n_ubrk_safe_clone_p(void);
@@ -584,6 +585,7 @@ testcase tc_array[] = {
     {"ITc_i18n_timezone_foreach_timezone_id_p",ITc_i18n_timezone_foreach_timezone_id_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_with_offset_p",ITc_i18n_timezone_foreach_timezone_id_with_offset_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_by_country_p",ITc_i18n_timezone_foreach_timezone_id_by_country_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
+       {"ITc_i18n_timezone_detect_host_timezone_p", ITc_i18n_timezone_detect_host_timezone_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_ubrk_create_destroy_p",ITc_i18n_ubrk_create_destroy_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_create_rules_p",ITc_i18n_ubrk_create_rules_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_safe_clone_p",ITc_i18n_ubrk_safe_clone_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
index 9cb3150..74893cd 100755 (executable)
@@ -78,6 +78,7 @@ extern int ITc_i18n_timezone_foreach_timezone_id_by_region_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_with_offset_p(void);
 extern int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void);
+extern int ITc_i18n_timezone_detect_host_timezone_p(void);
 extern int ITc_i18n_ubrk_create_destroy_p(void);
 extern int ITc_i18n_ubrk_create_rules_p(void);
 extern int ITc_i18n_ubrk_safe_clone_p(void);
@@ -365,6 +366,7 @@ testcase tc_array[] = {
     {"ITc_i18n_timezone_foreach_timezone_id_p", ITc_i18n_timezone_foreach_timezone_id_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_with_offset_p", ITc_i18n_timezone_foreach_timezone_id_with_offset_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_timezone_foreach_timezone_id_by_country_p", ITc_i18n_timezone_foreach_timezone_id_by_country_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
+       {"ITc_i18n_timezone_detect_host_timezone_p", ITc_i18n_timezone_detect_host_timezone_p, ITs_base_utils_timezone_startup, ITs_base_utils_timezone_cleanup},
     {"ITc_i18n_ubrk_create_destroy_p", ITc_i18n_ubrk_create_destroy_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_create_rules_p", ITc_i18n_ubrk_create_rules_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
     {"ITc_i18n_ubrk_safe_clone_p", ITc_i18n_ubrk_safe_clone_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},