Last change
on this file since 11360 was 11360, checked in by bastiK, 9 years ago |
fixed #10387 - efficiency for "inside(...)" function in MapCSS
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertTrue;
|
---|
5 |
|
---|
6 | import org.junit.Rule;
|
---|
7 | import org.junit.Test;
|
---|
8 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
9 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
10 |
|
---|
11 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit tests of {@link Territories} class.
|
---|
15 | */
|
---|
16 | public class TerritoriesTest {
|
---|
17 | /**
|
---|
18 | * Test rules.
|
---|
19 | */
|
---|
20 | @Rule
|
---|
21 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
22 | public JOSMTestRules rules = new JOSMTestRules().platform().projection().commands();
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Test of {@link Territories#getIso3166Codes} method.
|
---|
26 | */
|
---|
27 | @Test
|
---|
28 | public void testGetIso3166Codes() {
|
---|
29 | check("Paris", new LatLon(48.8567, 2.3508), "EU", "FR", "FX");
|
---|
30 | }
|
---|
31 |
|
---|
32 | private static void check(String name, LatLon ll, String ... expectedCodes) {
|
---|
33 | for (String e : expectedCodes) {
|
---|
34 | assertTrue(name + " " + e, Territories.isIso3166Code(e, ll));
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.