Skip to main content
added 171 characters in body; added 90 characters in body; added 13 characters in body
Source Link

I wrote a method, based on this presentation, that filters points based on their proximity to a target point. I would like to write a few test case. What would be good test cases for this method?

// The method returns all points in the database that are
// close enough to the target point
List<Point> findPointsNear(double longitude, 
                           double latitude,
                           double distanceInKilometers);

Edit - I'm more interested in a sanity test or two, to make sure I didn't screw anything while adapting/implementing the algorithm. Do you know of existing test code I could use? I'm ok with the method failing near the actual poles, as long it works in most countries.

I wrote a method, based on this presentation, that filters points based on their proximity to a target point. I would like to write a few test case. What would be good test cases for this method?

// The method returns all points in the database that are
// close enough to the target point
List<Point> findPointsNear(double longitude, 
                           double latitude,
                           double distanceInKilometers);

I wrote a method, based on this presentation, that filters points based on their proximity to a target point. I would like to write a few test case. What would be good test cases for this method?

// The method returns all points in the database that are
// close enough to the target point
List<Point> findPointsNear(double longitude, 
                           double latitude,
                           double distanceInKilometers);

Edit - I'm more interested in a sanity test or two, to make sure I didn't screw anything while adapting/implementing the algorithm. Do you know of existing test code I could use? I'm ok with the method failing near the actual poles, as long it works in most countries.

Source Link

Test case for geo-distance implementation?

I wrote a method, based on this presentation, that filters points based on their proximity to a target point. I would like to write a few test case. What would be good test cases for this method?

// The method returns all points in the database that are
// close enough to the target point
List<Point> findPointsNear(double longitude, 
                           double latitude,
                           double distanceInKilometers);