extern int utc_location_bounds_contains_coordinates_p(void);
extern int utc_location_bounds_contains_coordinates_n(void);
extern int utc_location_bounds_contains_coordinates_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_p(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n3(void);
extern int utc_location_bounds_create_rect_p(void);
extern int utc_location_bounds_create_rect_n(void);
extern int utc_location_bounds_create_rect_n2(void);
{"utc_location_bounds_contains_coordinates_p",utc_location_bounds_contains_coordinates_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n",utc_location_bounds_contains_coordinates_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n2",utc_location_bounds_contains_coordinates_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_p",utc_location_bounds_contains_coordinates_on_edge_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n",utc_location_bounds_contains_coordinates_on_edge_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n2",utc_location_bounds_contains_coordinates_on_edge_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n3",utc_location_bounds_contains_coordinates_on_edge_n3,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_p",utc_location_bounds_create_rect_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n",utc_location_bounds_create_rect_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n2",utc_location_bounds_create_rect_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
extern int utc_location_bounds_contains_coordinates_p(void);
extern int utc_location_bounds_contains_coordinates_n(void);
extern int utc_location_bounds_contains_coordinates_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_p(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n3(void);
extern int utc_location_bounds_create_rect_p(void);
extern int utc_location_bounds_create_rect_n(void);
extern int utc_location_bounds_create_rect_n2(void);
{"utc_location_bounds_contains_coordinates_p",utc_location_bounds_contains_coordinates_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n",utc_location_bounds_contains_coordinates_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n2",utc_location_bounds_contains_coordinates_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_p",utc_location_bounds_contains_coordinates_on_edge_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n",utc_location_bounds_contains_coordinates_on_edge_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n2",utc_location_bounds_contains_coordinates_on_edge_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n3",utc_location_bounds_contains_coordinates_on_edge_n3,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_p",utc_location_bounds_create_rect_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n",utc_location_bounds_create_rect_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n2",utc_location_bounds_create_rect_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
extern int utc_location_bounds_contains_coordinates_p(void);
extern int utc_location_bounds_contains_coordinates_n(void);
extern int utc_location_bounds_contains_coordinates_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_p(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n2(void);
+extern int utc_location_bounds_contains_coordinates_on_edge_n3(void);
extern int utc_location_bounds_create_rect_p(void);
extern int utc_location_bounds_create_rect_n(void);
extern int utc_location_bounds_create_rect_n2(void);
{"utc_location_bounds_contains_coordinates_p",utc_location_bounds_contains_coordinates_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n",utc_location_bounds_contains_coordinates_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_contains_coordinates_n2",utc_location_bounds_contains_coordinates_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_p",utc_location_bounds_contains_coordinates_on_edge_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n",utc_location_bounds_contains_coordinates_on_edge_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n2",utc_location_bounds_contains_coordinates_on_edge_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
+ {"utc_location_bounds_contains_coordinates_on_edge_n3",utc_location_bounds_contains_coordinates_on_edge_n3,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_p",utc_location_bounds_create_rect_p,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n",utc_location_bounds_create_rect_n,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
{"utc_location_bounds_create_rect_n2",utc_location_bounds_create_rect_n2,utc_location_manager_bound_startup,utc_location_manager_bound_cleanup},
return 0;
}
+/**
+ * @testcase utc_location_bounds_contains_coordinates_on_edge_p
+ * @since_tizen 6.0
+ * @description Checks whether the edges of the bounds contain the specified coordinates within tolerance
+ */
+int utc_location_bounds_contains_coordinates_on_edge_p(void)
+{
+ location_bounds_h bounds_poly = NULL;
+ int poly_size = 4;
+ double tolerance = 40;
+ location_coords_s coord_list[poly_size];
+ coord_list[0].latitude = 28.581394;
+ coord_list[0].longitude = 77.362621;
+ coord_list[1].latitude = 28.580652;
+ coord_list[1].longitude = 77.363302;
+ coord_list[2].latitude = 28.580976;
+ coord_list[2].longitude = 77.363771;
+ coord_list[3].latitude = 28.581717;
+ coord_list[3].longitude = 77.363032;
+ location_coords_s test_coords;
+ test_coords.latitude = 28.580723;
+ test_coords.longitude = 77.363666;
+
+ ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ location_bounds_contains_coordinates_on_edge(bounds_poly, test_coords, tolerance);
+ ret = get_last_result();
+ CHECK_ERROR_NONE(is_location_supported, ret);
+
+ ret = location_bounds_destroy(bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_location_bounds_contains_coordinates_on_edge_n
+ * @since_tizen 6.0
+ * @description Checks whether the edges of the bounds contain the specified coordinates within tolerance with invalid parameters
+ */
+int utc_location_bounds_contains_coordinates_on_edge_n(void)
+{
+ double tolerance = 40;
+ location_coords_s test_coords;
+ test_coords.latitude = 28.580723;
+ test_coords.longitude = 77.363666;
+
+ location_bounds_contains_coordinates_on_edge(NULL, test_coords, tolerance);
+ ret = get_last_result();
+ CHECK_INVALID_PARAMETER(is_location_supported, ret);
+ return 0;
+}
+
+/**
+ * @testcase utc_location_bounds_contains_coordinates_on_edge_n2
+ * @since_tizen 6.0
+ * @description Checks whether the edges of the bounds contain the specified coordinates within tolerance with invalid parameters
+ */
+int utc_location_bounds_contains_coordinates_on_edge_n2(void)
+{
+ location_bounds_h bounds_poly = NULL;
+ int poly_size = 4;
+ double tolerance = 40;
+ location_coords_s coord_list[poly_size];
+ coord_list[0].latitude = 28.581394;
+ coord_list[0].longitude = 77.362621;
+ coord_list[1].latitude = 28.580652;
+ coord_list[1].longitude = 77.363302;
+ coord_list[2].latitude = 28.580976;
+ coord_list[2].longitude = 77.363771;
+ coord_list[3].latitude = 28.581717;
+ coord_list[3].longitude = 77.363032;
+ location_coords_s coord_test;
+ coord_test.latitude = -91;
+ coord_test.longitude = 181;
+
+ ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ location_bounds_contains_coordinates_on_edge(bounds_poly, coord_test, tolerance);
+ ret = get_last_result();
+ CHECK_INVALID_PARAMETER(is_location_supported, ret);
+
+ ret = location_bounds_destroy(bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_location_bounds_contains_coordinates_on_edge_n3
+ * @since_tizen 6.0
+ * @description Checks whether the edges of the bounds contain the specified coordinates within tolerance with invalid parameters
+ */
+int utc_location_bounds_contains_coordinates_on_edge_n3(void)
+{
+ location_bounds_h bounds_poly = NULL;
+ int poly_size = 4;
+ double tolerance = -40;
+ location_coords_s coord_list[poly_size];
+ coord_list[0].latitude = 28.581394;
+ coord_list[0].longitude = 77.362621;
+ coord_list[1].latitude = 28.580652;
+ coord_list[1].longitude = 77.363302;
+ coord_list[2].latitude = 28.580976;
+ coord_list[2].longitude = 77.363771;
+ coord_list[3].latitude = 28.581717;
+ coord_list[3].longitude = 77.363032;
+ location_coords_s coord_test;
+ coord_test.latitude = 28.580723;
+ coord_test.longitude = 77.363666;
+
+ ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ location_bounds_contains_coordinates_on_edge(bounds_poly, coord_test, tolerance);
+ ret = get_last_result();
+ CHECK_INVALID_PARAMETER(is_location_supported, ret);
+
+ ret = location_bounds_destroy(bounds_poly);
+ CHECK(is_location_supported, ret);
+
+ return 0;
+}
+
/**
* @testcase utc_location_bounds_create_rect_p
* @since_tizen 2.3