Changeset 6334 in josm
- Timestamp:
- 2013-10-27T04:06:10+01:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r6267 r6334 231 231 for (String key : o.keySet()) { 232 232 s.append(INDENT).append(INDENT); 233 s.append(String.format("\"%s\"=\"%s\" \n", key, o.get(key)));233 s.append(String.format("\"%s\"=\"%s\"%n", key, o.get(key))); 234 234 } 235 235 } -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r6203 r6334 66 66 out.println("<?xml version='1.0' encoding='UTF-8'?>"); 67 67 out.println("<gpx version=\"1.1\" creator=\"JOSM GPX export\" xmlns=\"http://www.topografix.com/GPX/1/1\"\n" + 68 (hasExtensions ? String.format(" xmlns:josm=\"%s\" \n", JOSM_EXTENSIONS_NAMESPACE_URI) : "") +68 (hasExtensions ? String.format(" xmlns:josm=\"%s\"%n", JOSM_EXTENSIONS_NAMESPACE_URI) : "") + 69 69 " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n" + 70 70 " xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">"); -
trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
r5556 r6334 169 169 foundAtLeastOne = true; 170 170 if (!osm.get(key).equals(filterCode(osm))) { 171 failedPrimitives.append(String.format("Object %s. Expected [%s] but was [%s] \n", osm.toString(), osm.get(key), filterCode(osm)));171 failedPrimitives.append(String.format("Object %s. Expected [%s] but was [%s]%n", osm.toString(), osm.get(key), filterCode(osm))); 172 172 } 173 173 } … … 175 175 assertTrue(foundAtLeastOne); 176 176 if (failedPrimitives.length() != 0) 177 throw new AssertionError(String.format("Run #%d \n%s", i, failedPrimitives.toString()));177 throw new AssertionError(String.format("Run #%d%n%s", i, failedPrimitives.toString())); 178 178 } 179 179 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java
r6286 r6334 6 6 import org.junit.Assert; 7 7 import org.junit.Test; 8 9 8 import org.openstreetmap.josm.data.coor.LatLon; 10 9 -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
r5554 r6334 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.projection; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.io.BufferedReader; … … 10 8 import java.util.Collection; 11 9 import java.util.HashMap; 12 import java.util.LinkedHashMap;13 import java.util.List;14 10 import java.util.Map; 15 11 import java.util.Map.Entry; … … 68 64 { 69 65 EastNorth en = p.latlon2eastNorth(new LatLon(lat, lon)); 70 String error = String.format("%s (%s): Projecting latlon(%s,%s): \n" +71 " expected: eastnorth(%s,%s), \n" +72 " but got: eastnorth(%s,%s)! \n",66 String error = String.format("%s (%s): Projecting latlon(%s,%s):%n" + 67 " expected: eastnorth(%s,%s),%n" + 68 " but got: eastnorth(%s,%s)!%n", 73 69 p.toString(), code, lat, lon, east, north, en.east(), en.north()); 74 70 double EPSILON = 1e-3; // 1 mm accuracy … … 79 75 { 80 76 LatLon ll = p.eastNorth2latlon(new EastNorth(east, north)); 81 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s): \n" +82 " expected: latlon(%s,%s), \n" +83 " but got: latlon(%s,%s)! \n",77 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):%n" + 78 " expected: latlon(%s,%s),%n" + 79 " but got: latlon(%s,%s)!%n", 84 80 p.toString(), code, east, north, lat, lon, ll.lat(), ll.lon()); 85 81 double EPSILON = Math.toDegrees(1e-3 / 6378137); // 1 mm accuracy (or better) -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r5554 r6334 108 108 EastNorth en = proj.latlon2eastNorth(new LatLon(lat, lon)); 109 109 LatLon ll2 = proj.eastNorth2latlon(en); 110 out.write(String.format("%s \n ll %s %s\n en %s %s\n ll2 %s %s\n", proj.toCode(), lat, lon, en.east(), en.north(), ll2.lat(), ll2.lon()));110 out.write(String.format("%s%n ll %s %s%n en %s %s%n ll2 %s %s%n", proj.toCode(), lat, lon, en.east(), en.north(), ll2.lat(), ll2.lon())); 111 111 } 112 112 out.close(); … … 178 178 EastNorth en = proj.latlon2eastNorth(data.ll); 179 179 if (!en.equals(data.en)) { 180 String error = String.format("%s (%s): Projecting latlon(%s,%s): \n" +181 " expected: eastnorth(%s,%s), \n" +182 " but got: eastnorth(%s,%s)! \n",180 String error = String.format("%s (%s): Projecting latlon(%s,%s):%n" + 181 " expected: eastnorth(%s,%s),%n" + 182 " but got: eastnorth(%s,%s)!%n", 183 183 proj.toString(), data.code, data.ll.lat(), data.ll.lon(), data.en.east(), data.en.north(), en.east(), en.north()); 184 184 fail.append(error); … … 186 186 LatLon ll2 = proj.eastNorth2latlon(data.en); 187 187 if (!ll2.equals(data.ll2)) { 188 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s): \n" +189 " expected: latlon(%s,%s), \n" +190 " but got: latlon(%s,%s)! \n",188 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):%n" + 189 " expected: latlon(%s,%s),%n" + 190 " but got: latlon(%s,%s)!%n", 191 191 proj.toString(), data.code, data.en.east(), data.en.north(), data.ll2.lat(), data.ll2.lon(), ll2.lat(), ll2.lon()); 192 192 fail.append(error); -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
r5556 r6334 65 65 Bounds b = p.getWorldBoundsLatLon(); 66 66 67 text += String.format("*** %s %s \n", p.toString(), p.toCode());67 text += String.format("*** %s %s%n", p.toString(), p.toCode()); 68 68 for (int num=0; num < 1000; ++num) { 69 69 … … 86 86 error = true; 87 87 } 88 text += String.format("%s errorLat: %s errorLon: %s \n", mark, maxErrLat, maxErrLon);88 text += String.format("%s errorLat: %s errorLon: %s%n", mark, maxErrLat, maxErrLon); 89 89 } 90 90 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
r6264 r6334 52 52 EastNorth en2 = swiss.latlon2eastNorth(pd.ll); 53 53 if (Math.abs(pd.en.east() - en2.east()) > EPSILON || Math.abs(pd.en.north() - en2.north()) > EPSILON) { 54 errs.append(String.format("%s should be: %s but is: %s \n", pd.name, pd.en, en2));54 errs.append(String.format("%s should be: %s but is: %s%n", pd.name, pd.en, en2)); 55 55 } 56 56 }
Note:
See TracChangeset
for help on using the changeset viewer.