Changeset 13684 in josm for trunk/test/unit


Ignore:
Timestamp:
2018-04-26T21:47:18+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #16224 - update definition of SWEREF99 projections for Sweden

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java

    r13598 r13684  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.projection;
     3
     4import static org.junit.Assert.assertTrue;
    35
    46import java.security.SecureRandom;
     
    148150            Assert.fail();
    149151        }
    150         Assert.assertTrue("missing test: "+projIds, projIds.isEmpty());
     152        assertTrue("missing test: "+projIds, projIds.isEmpty());
    151153    }
    152154
     
    168170            EastNorth en = p.latlon2eastNorth(ll1);
    169171            LatLon ll2 = p.eastNorth2latlon(en);
    170             Assert.assertTrue(p.toCode() + " at " + ll1 + " is " + ll2, ll2.isValid());
     172            assertTrue(p.toCode() + " at " + ll1 + " is " + ll2, ll2.isValid());
    171173            double dist = ll1.greatCircleDistance(ll2);
    172174            if (dist > eps) {
     
    182184        }
    183185    }
     186
     187    /**
     188     * Checks that Swedish projections have their axis defined correctly.
     189     */
     190    @Test
     191    public void testSwedishProjections() {
     192        for (int code = 3006; code <= 3018; code++) {
     193            assertTrue(Projections.getProjectionByCode("EPSG:"+code).switchXY());
     194        }
     195    }
    184196}
Note: See TracChangeset for help on using the changeset viewer.