return 0;
}
+
+//& purpose: To check whether the edges of the bounds contain the specified coordinates within tolerance.
+//& type: auto
+/**
+* @testcase ITc_location_bounds_contains_coordinates_on_edge_p
+* @since_tizen 6.0
+* @author SRID(priya.kohli)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Checks whether the edges of the bounds contain the specified coordinates within tolerance.
+* @scenario creates a polygon type of new location bounds and verify output\n
+* check the generate location bound for null\n
+* check coordinates on polygon boundary within tolerance\n
+* destroy a polygon type of new location bounds and verify output
+* @apicovered location_bounds_contains_coordinates, location_bounds_create_polygon, location_bounds_destroy
+* @passcase When location_bounds_contains_coordinates_on_edge and supporting APIs are successful
+* @failcase If target API or supporting APIs fails
+* @precondition None
+* @postcondition None
+*/
+int ITc_location_bounds_contains_coordinates_on_edge_p(void)
+{
+ START_TEST;
+
+ location_bounds_h hPolyLocationBound = NULL;
+ bool bIsContained = false;
+ int nPolySize = 4;
+ location_coords_s location_coord_list[nPolySize];
+ location_coord_list[0].latitude = 28.581394;
+ location_coord_list[0].longitude = 77.362621;
+ location_coord_list[1].latitude = 28.580652;
+ location_coord_list[1].longitude = 77.363302;
+ location_coord_list[2].latitude = 28.580976;
+ location_coord_list[2].longitude = 77.363771;
+ location_coord_list[3].latitude = 28.581717;
+ location_coord_list[3].longitude = 77.363032;
+
+ location_coords_s testLocationCoordinates;
+ testLocationCoordinates.latitude = 28.580723;
+ testLocationCoordinates.longitude = 77.363666;
+ location_bound_error_e nRet = location_bounds_create_polygon(location_coord_list, nPolySize, &hPolyLocationBound);
+ if ( false == g_bIsLocationFeatureSupported )
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("[Line : %d][%s] Feature support as returned by TCTCheckSystemInfoFeatureSupported() and error code as returned by location_bounds_create_polygon() mismatched, Leaving test\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] feature not supported, Leaving test\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ }
+ PRINT_RESULT(LOCATION_BOUNDS_ERROR_NONE, nRet, "location_bounds_create_polygon", LocationBoundsGetError(nRet));
+ CHECK_HANDLE(hPolyLocationBound, "location_bounds_create_polygon");
+
+ double dTolerance = 40;
+ bIsContained = location_bounds_contains_coordinates_on_edge(hPolyLocationBound, testLocationCoordinates, dTolerance);
+ if ( bIsContained == false )
+ {
+ FPRINTF("[Line : %d][%s] location_bounds_contains_coordinates_on_edge failed, bIsContained returned = false\\n", __LINE__, API_NAMESPACE);
+ location_bounds_destroy(hPolyLocationBound);
+ return 1;
+ }
+
+ bIsContained = false;
+ nRet = location_bounds_destroy(hPolyLocationBound);
+ PRINT_RESULT_NORETURN(LOCATION_BOUNDS_ERROR_NONE, nRet, "location_bounds_destroy", LocationBoundsGetError(nRet));
+
+ return 0;
+}
/** @} */
/** @} */
extern int ITc_location_bounds_foreach_polygon_coords_p(void);
extern int ITc_location_bounds_contains_coordinates_p(void);
extern int ITc_location_bounds_get_type_p(void);
+extern int ITc_location_bounds_contains_coordinates_on_edge_p(void);
extern int ITc_gps_status_get_nmea_p(void);
extern int ITc_gps_status_get_satellite_p(void);
extern int ITc_gps_status_get_last_satellite_p(void);
{"ITc_location_bounds_foreach_polygon_coords_p",ITc_location_bounds_foreach_polygon_coords_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_contains_coordinates_p",ITc_location_bounds_contains_coordinates_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_get_type_p",ITc_location_bounds_get_type_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
+ {"ITc_location_bounds_contains_coordinates_on_edge_p",ITc_location_bounds_contains_coordinates_on_edge_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_gps_status_get_nmea_p",ITc_gps_status_get_nmea_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_satellite_p",ITc_gps_status_get_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_last_satellite_p",ITc_gps_status_get_last_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
extern int ITc_location_bounds_foreach_polygon_coords_p(void);
extern int ITc_location_bounds_contains_coordinates_p(void);
extern int ITc_location_bounds_get_type_p(void);
+extern int ITc_location_bounds_contains_coordinates_on_edge_p(void);
extern int ITc_gps_status_get_nmea_p(void);
extern int ITc_gps_status_get_satellite_p(void);
extern int ITc_gps_status_get_last_satellite_p(void);
{"ITc_location_bounds_foreach_polygon_coords_p",ITc_location_bounds_foreach_polygon_coords_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_contains_coordinates_p",ITc_location_bounds_contains_coordinates_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_get_type_p",ITc_location_bounds_get_type_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
+ {"ITc_location_bounds_contains_coordinates_on_edge_p",ITc_location_bounds_contains_coordinates_on_edge_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_gps_status_get_nmea_p",ITc_gps_status_get_nmea_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_satellite_p",ITc_gps_status_get_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_last_satellite_p",ITc_gps_status_get_last_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
extern int ITc_location_bounds_foreach_polygon_coords_p(void);
extern int ITc_location_bounds_contains_coordinates_p(void);
extern int ITc_location_bounds_get_type_p(void);
+extern int ITc_location_bounds_contains_coordinates_on_edge_p(void);
extern int ITc_gps_status_get_nmea_p(void);
extern int ITc_gps_status_get_satellite_p(void);
extern int ITc_gps_status_get_last_satellite_p(void);
{"ITc_location_bounds_foreach_polygon_coords_p",ITc_location_bounds_foreach_polygon_coords_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_contains_coordinates_p",ITc_location_bounds_contains_coordinates_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_location_bounds_get_type_p",ITc_location_bounds_get_type_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
+ {"ITc_location_bounds_contains_coordinates_on_edge_p",ITc_location_bounds_contains_coordinates_on_edge_p,ITs_location_bounds_startup,ITs_location_bounds_cleanup},
{"ITc_gps_status_get_nmea_p",ITc_gps_status_get_nmea_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_satellite_p",ITc_gps_status_get_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},
{"ITc_gps_status_get_last_satellite_p",ITc_gps_status_get_last_satellite_p,ITs_location_gps_status_startup,ITs_location_gps_status_cleanup},