Changeset 15038 in josm for trunk/test


Ignore:
Timestamp:
2019-05-02T18:30:31+02:00 (6 years ago)
Author:
GerdP
Message:

see #17616: adapt unit test

File:
1 edited

Legend:

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

    r14802 r15038  
    3434        Node node2 = new Node();
    3535        Way way = new Way();
    36         node1.setCoor(new LatLon(0, 0));
    37         node2.setCoor(new LatLon(0, 1));
     36        node1.setCoor(new LatLon(0.5, 0));
     37        node2.setCoor(new LatLon(-0.5, 0));
    3838        way.addNode(node1);
    3939        way.addNode(node2);
    4040
    41         WayPoint waypoint = new WayPoint(new LatLon(1, 0));
     41        WayPoint waypoint = new WayPoint(new LatLon(0, 1));
    4242
    4343        double distance = GpxDistance.getDistanceWay(null, waypoint);
     
    104104        en = new EastNorth(0, 1);
    105105        distance = GpxDistance.getDistanceEastNorth(en, waypoint);
    106         /* 111319.49077 uses the WGS84/NAD38/GRS80 model for
    107          * the distance between (0, 0) and (0, 1) */
    108         assertEquals(111319.49077, distance, 0.1);
     106        assertEquals(1, distance, 0.000001);
    109107    }
    110108
Note: See TracChangeset for help on using the changeset viewer.