Skip to content

Commit

Permalink
update tests to cater for tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Aug 2, 2024
1 parent a4cf931 commit 1f45383
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ public void testIsPointOnShape() {
// Inside the shape
assertTrue(shapeWrapper.isPointOnShape(new Point2D.Double(0.5, 0.5)));

// Outside the shape
assertFalse(shapeWrapper.isPointOnShape(new Point2D.Double(1.5, 1.5)));
// Outside the shape but within tolerance region
assertTrue(shapeWrapper.isPointOnShape(new Point2D.Double(1.5, 1.5)));

// Outside the shape but not within tolerance region
assertFalse(shapeWrapper.isPointOnShape(new Point2D.Double(3, 3)));

// On the border of the shape
assertTrue(shapeWrapper.isPointOnShape(new Point2D.Double(1, 0)));
Expand Down

0 comments on commit 1f45383

Please sign in to comment.