Skip to content

Commit f1b596a

Browse files
committed
Add GeometryTestCase checkEqualExact with a tolerance
1 parent 37b3154 commit f1b596a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

modules/core/src/test/java/test/jts/GeometryTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ protected void checkEqualExact(Geometry expected, Geometry actual) {
114114
assertTrue(equal);
115115
}
116116

117+
protected void checkEqualExact(Geometry expected, Geometry actual, double tolerance) {
118+
boolean equal = actual.equalsExact(expected, tolerance);
119+
if (! equal) {
120+
System.out.format(CHECK_EQUAL_FAIL, expected, actual );
121+
}
122+
assertTrue(equal);
123+
}
124+
117125
protected void checkEqual(Geometry expected, Geometry actual, double tolerance) {
118126
Geometry actualNorm = actual.norm();
119127
Geometry expectedNorm = expected.norm();

0 commit comments

Comments
 (0)