Changeset 6881 in josm for trunk/test/unit/org/openstreetmap/josm/data/projection
- Timestamp:
- 2014-02-24T17:49:12+01:00 (10 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/projection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java
r6334 r6881 41 41 maxErrLon = Math.max(maxErrLon, Math.abs(lon - ll.lon())); 42 42 } 43 //System.err.println(String.format("maxerror lat: %s maxerror lon: %s", maxErrLat, maxErrLon));44 43 } 45 44 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r6471 r6881 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.projection; 3 4 3 5 4 import java.io.BufferedReader; … … 25 24 import org.openstreetmap.josm.Main; 26 25 import org.openstreetmap.josm.data.Bounds; 27 import org.openstreetmap.josm.data.Preferences;28 26 import org.openstreetmap.josm.data.coor.EastNorth; 29 27 import org.openstreetmap.josm.data.coor.LatLon; … … 147 145 } 148 146 147 /** 148 * Setup test. 149 */ 149 150 @BeforeClass 150 151 public static void setUp() { … … 198 199 throw new AssertionError(fail.toString()); 199 200 } 200 201 201 } 202 202 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
r6334 r6881 12 12 public class ProjectionTest { 13 13 14 private static final boolean debug = false;15 14 private static Random rand = new Random(System.currentTimeMillis()); 16 15 … … 64 63 double maxErrLat = 0, maxErrLon = 0; 65 64 Bounds b = p.getWorldBoundsLatLon(); 66 65 67 66 text += String.format("*** %s %s%n", p.toString(), p.toCode()); 68 67 for (int num=0; num < 1000; ++num) { 69 68 70 69 double lat = rand.nextDouble() * (b.getMax().lat() - b.getMin().lat()) + b.getMin().lat(); 71 70 double lon = rand.nextDouble() * (b.getMax().lon() - b.getMin().lon()) + b.getMin().lon(); 72 71 73 72 LatLon ll = new LatLon(lat, lon); 74 73 75 74 for (int i=0; i<10; ++i) { 76 75 EastNorth en = p.latlon2eastNorth(ll); … … 80 79 maxErrLon = Math.max(maxErrLon, Math.abs(lon - ll.lon())); 81 80 } 82 81 83 82 String mark = ""; 84 83 if (maxErrLat + maxErrLon > 1e-5) { -
trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
r6334 r6881 13 13 private boolean debug = false; 14 14 15 /** 16 * Setup test. 17 */ 15 18 @BeforeClass 16 19 public static void setUp() {
Note:
See TracChangeset
for help on using the changeset viewer.