Changeset 18183 in josm for trunk/test
- Timestamp:
- 2021-08-30T18:44:20+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/vectortile/mapbox/GeometryTest.java
r17867 r18183 6 6 import static org.junit.jupiter.api.Assertions.assertThrows; 7 7 import static org.junit.jupiter.api.Assertions.assertTrue; 8 9 8 10 9 import java.awt.geom.Area; … … 139 138 } 140 139 140 /** 141 * This checks that the area is properly calculated 142 */ 143 @Test 144 void testNonRegression20971And21254() { 145 assertEquals(15.0, Geometry.calculateSurveyorsArea(new int[]{1507, 1509, 1509}, new int[]{3029, 3018, 3033})); 146 assertEquals(0.0, Geometry.calculateSurveyorsArea(new int[]{0, 0, 0}, new int[]{0, 0, 0})); 147 assertEquals(0.0, Geometry.calculateSurveyorsArea(new int[2], new int[2])); 148 assertThrows(IllegalArgumentException.class, () -> Geometry.calculateSurveyorsArea(new int[3], new int[4])); 149 } 150 141 151 @Test 142 152 void testMultiPolygon() {
Note:
See TracChangeset
for help on using the changeset viewer.