[UTC][location-manager][ACR-1593][Added location_manager_get_velocity_accuracy API] 08/244708/3
authorchakradhar <v.pogiri@samsung.com>
Wed, 23 Sep 2020 09:56:52 +0000 (15:26 +0530)
committerchakradhar <v.pogiri@samsung.com>
Wed, 23 Sep 2020 15:16:32 +0000 (20:46 +0530)
Change-Id: I73384f9c5bec7c7f5c9b7892702241b7c93d4611

src/utc/location-manager/tct-location-manager-core_mobile.h
src/utc/location-manager/tct-location-manager-core_tizeniot.h
src/utc/location-manager/tct-location-manager-core_wearable.h
src/utc/location-manager/utc-location-manager.c

index 7e7ea383b7e7aff23736e01ede3e2e72c6ca4a0e..724848e3a7cd5c5256a251c72a44bb015b440dee 100755 (executable)
@@ -50,6 +50,8 @@ extern int utc_location_manager_get_velocity_p(void);
 extern int utc_location_manager_get_velocity_n(void);
 extern int utc_location_manager_get_accuracy_p(void);
 extern int utc_location_manager_get_accuracy_n(void);
+extern int utc_location_manager_get_velocity_accuracy_p(void);
+extern int utc_location_manager_get_velocity_accuracy_n(void);
 extern int utc_location_manager_get_last_accuracy_p(void);
 extern int utc_location_manager_get_last_accuracy_n(void);
 extern int utc_location_manager_get_accessibility_state_p(void);
@@ -213,6 +215,8 @@ testcase tc_array[] = {
        {"utc_location_manager_get_velocity_n",utc_location_manager_get_velocity_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_p",utc_location_manager_get_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_n",utc_location_manager_get_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_p",utc_location_manager_get_velocity_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_n",utc_location_manager_get_velocity_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_p",utc_location_manager_get_last_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_n",utc_location_manager_get_last_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accessibility_state_p",utc_location_manager_get_accessibility_state_p,utc_location_manager_startup,utc_location_manager_cleanup},
index 7e7ea383b7e7aff23736e01ede3e2e72c6ca4a0e..724848e3a7cd5c5256a251c72a44bb015b440dee 100755 (executable)
@@ -50,6 +50,8 @@ extern int utc_location_manager_get_velocity_p(void);
 extern int utc_location_manager_get_velocity_n(void);
 extern int utc_location_manager_get_accuracy_p(void);
 extern int utc_location_manager_get_accuracy_n(void);
+extern int utc_location_manager_get_velocity_accuracy_p(void);
+extern int utc_location_manager_get_velocity_accuracy_n(void);
 extern int utc_location_manager_get_last_accuracy_p(void);
 extern int utc_location_manager_get_last_accuracy_n(void);
 extern int utc_location_manager_get_accessibility_state_p(void);
@@ -213,6 +215,8 @@ testcase tc_array[] = {
        {"utc_location_manager_get_velocity_n",utc_location_manager_get_velocity_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_p",utc_location_manager_get_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_n",utc_location_manager_get_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_p",utc_location_manager_get_velocity_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_n",utc_location_manager_get_velocity_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_p",utc_location_manager_get_last_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_n",utc_location_manager_get_last_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accessibility_state_p",utc_location_manager_get_accessibility_state_p,utc_location_manager_startup,utc_location_manager_cleanup},
index 7e7ea383b7e7aff23736e01ede3e2e72c6ca4a0e..724848e3a7cd5c5256a251c72a44bb015b440dee 100755 (executable)
@@ -50,6 +50,8 @@ extern int utc_location_manager_get_velocity_p(void);
 extern int utc_location_manager_get_velocity_n(void);
 extern int utc_location_manager_get_accuracy_p(void);
 extern int utc_location_manager_get_accuracy_n(void);
+extern int utc_location_manager_get_velocity_accuracy_p(void);
+extern int utc_location_manager_get_velocity_accuracy_n(void);
 extern int utc_location_manager_get_last_accuracy_p(void);
 extern int utc_location_manager_get_last_accuracy_n(void);
 extern int utc_location_manager_get_accessibility_state_p(void);
@@ -213,6 +215,8 @@ testcase tc_array[] = {
        {"utc_location_manager_get_velocity_n",utc_location_manager_get_velocity_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_p",utc_location_manager_get_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accuracy_n",utc_location_manager_get_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_p",utc_location_manager_get_velocity_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
+       {"utc_location_manager_get_velocity_accuracy_n",utc_location_manager_get_velocity_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_p",utc_location_manager_get_last_accuracy_p,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_last_accuracy_n",utc_location_manager_get_last_accuracy_n,utc_location_manager_startup,utc_location_manager_cleanup},
        {"utc_location_manager_get_accessibility_state_p",utc_location_manager_get_accessibility_state_p,utc_location_manager_startup,utc_location_manager_cleanup},
index 883dfef9fd5692395d0de4dc9ca695e1fff1ffac..b0a4cc0d6d1c7fcbe17eb9e7e4129b2cd95dfc46 100755 (executable)
@@ -712,6 +712,60 @@ int utc_location_manager_get_accuracy_n(void)
        return 0;
 }
 
+/**
+ * @testcase           utc_location_manager_get_velocity_accuracy_p
+ * @since_tizen                6.0
+ * @description                Gets the current velocity accuracy information
+ */
+int utc_location_manager_get_velocity_accuracy_p(void)
+{
+       double velocity_accuracy = 0.0;
+       service_enabled = false;
+
+       if (is_location_supported) {
+               ret = location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+               assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+               ret = location_manager_start(manager);
+               assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+               wait_for_service();
+               assert(service_enabled);
+
+               ret = location_manager_get_velocity_accuracy(manager, &velocity_accuracy);
+               assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+               ret = location_manager_stop(manager);
+               assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+               ret = location_manager_unset_service_state_changed_cb(manager);
+               assert_eq(ret, LOCATIONS_ERROR_NONE);
+       } else {
+               ret = location_manager_get_velocity_accuracy(manager, &velocity_accuracy);
+               assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+/**
+ * @testcase           utc_location_manager_get_velocity_accuracy_n
+ * @since_tizen                6.0
+ * @description                Gets the current velocity accuracy information with invalid parameters
+ */
+int utc_location_manager_get_velocity_accuracy_n(void)
+{
+       double velocity_accuracy = 0.0;
+
+       ret = location_manager_get_velocity_accuracy(NULL, &velocity_accuracy);
+       CHECK_INVALID_PARAMETER(is_location_supported, ret);
+
+       ret = location_manager_get_velocity_accuracy(manager, NULL);
+       CHECK_INVALID_PARAMETER(is_location_supported, ret);
+
+       return 0;
+}
+
 /**
  * @testcase           utc_location_manager_get_last_accuracy_p
  * @since_tizen                2.3