Changeset 10061 in josm
- Timestamp:
- 2016-03-28T00:00:48+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r10060 r10061 112 112 } 113 113 114 private static EastNorth getRoundedToOsmPrecision(double east, double north) { 115 return new EastNorth(LatLon.roundToOsmPrecision(east), LatLon.roundToOsmPrecision(north)); 116 } 117 114 118 private static List<TestData> readData() throws IOException, FileNotFoundException { 115 119 try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), … … 133 137 if (TestUtils.getJavaVersion() >= 9) { 134 138 next.ll = next.ll.getRoundedToOsmPrecision(); 135 next.en = new EastNorth(LatLon.roundToOsmPrecision(en.a), LatLon.roundToOsmPrecision(en.b));139 next.en = getRoundedToOsmPrecision(en.a, en.b); 136 140 next.ll2 = next.ll2.getRoundedToOsmPrecision(); 137 141 } … … 187 191 } 188 192 EastNorth en = proj.latlon2eastNorth(data.ll); 193 if (TestUtils.getJavaVersion() >= 9) { 194 en = getRoundedToOsmPrecision(en.east(), en.north()); 195 } 189 196 if (!en.equals(data.en)) { 190 197 String error = String.format("%s (%s): Projecting latlon(%s,%s):%n" + … … 195 202 } 196 203 LatLon ll2 = proj.eastNorth2latlon(data.en); 204 if (TestUtils.getJavaVersion() >= 9) { 205 ll2 = ll2.getRoundedToOsmPrecision(); 206 } 197 207 if (!ll2.equals(data.ll2)) { 198 208 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):%n" +
Note:
See TracChangeset
for help on using the changeset viewer.