Changeset 7082 in josm for trunk/test/unit/org/openstreetmap/josm/data
- Timestamp:
- 2014-05-09T05:32:37+02:00 (11 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/projection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
r7033 r7082 7 7 import java.io.IOException; 8 8 import java.io.InputStreamReader; 9 import java.nio.charset.StandardCharsets; 9 10 import java.util.Collection; 10 11 import java.util.HashMap; … … 17 18 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; 18 19 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 19 import org.openstreetmap.josm.tools.Utils;20 20 21 21 /** 22 22 * Test projections using reference data. (Currently provided by proj.4) 23 * 23 * 24 24 * The data file data_nodist/projection-reference-data.csv can be created like this: 25 25 * Fist run this file's main method to collect epsg codes and bounds data. … … 46 46 } 47 47 } 48 48 49 49 @Test 50 50 public void test() throws IOException, FileNotFoundException { 51 51 try (BufferedReader in = new BufferedReader(new InputStreamReader( 52 new FileInputStream("data_nodist/projection-reference-data.csv"), Utils.UTF_8))) {52 new FileInputStream("data_nodist/projection-reference-data.csv"), StandardCharsets.UTF_8))) { 53 53 StringBuilder fail = new StringBuilder(); 54 54 String line; -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r7081 r7082 11 11 import java.io.InputStreamReader; 12 12 import java.io.OutputStreamWriter; 13 import java.nio.charset.StandardCharsets; 13 14 import java.util.ArrayList; 14 15 import java.util.Collection; … … 30 31 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 31 32 import org.openstreetmap.josm.tools.Pair; 32 import org.openstreetmap.josm.tools.Utils;33 33 34 34 /** … … 89 89 90 90 Random rand = new Random(); 91 try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(PROJECTION_DATA_FILE), Utils.UTF_8))) {91 try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(PROJECTION_DATA_FILE), StandardCharsets.UTF_8))) { 92 92 out.write("# Data for test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java\n"); 93 93 out.write("# Format: 1. Projection code; 2. lat/lon; 3. lat/lon projected -> east/north; 4. east/north (3.) inverse projected\n"); … … 112 112 113 113 private static List<TestData> readData() throws IOException, FileNotFoundException { 114 try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), Utils.UTF_8))) {114 try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), StandardCharsets.UTF_8))) { 115 115 List<TestData> result = new ArrayList<>(); 116 116 String line;
Note:
See TracChangeset
for help on using the changeset viewer.