Changeset 12169 in josm for trunk/test


Ignore:
Timestamp:
2017-05-15T17:39:43+02:00 (2 years ago)
Author:
michael2402
Message:

Fix lat/lon swapped for GPX conversion, add asymetric test case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxDataTest.java

    r12167 r12169  
    326326
    327327        WayPoint closeToMiddle = data.nearestPointOnTrack(new EastNorth(10, 0), 10);
    328         assertEquals(points.get(1).lat(), closeToMiddle.lat(), 1e-4);
    329         assertEquals(points.get(1).lon(), closeToMiddle.lon(), 1e-4);
     328        assertEquals(points.get(1), closeToMiddle);
    330329
    331330        WayPoint close = data.nearestPointOnTrack(new EastNorth(5, 5), 10);
     331        assertEquals(10, close.getEastNorth().east(), .01);
     332        assertEquals(5, close.getEastNorth().north(), .01);
     333
     334        close = data.nearestPointOnTrack(new EastNorth(15, 5), 10);
    332335        assertEquals(10, close.getEastNorth().east(), .01);
    333336        assertEquals(5, close.getEastNorth().north(), .01);
Note: See TracChangeset for help on using the changeset viewer.