Changeset 6995 in josm for trunk/test/unit
- Timestamp:
- 2014-04-23T02:30:39+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
r6334 r6995 3 3 4 4 import java.io.BufferedReader; 5 import java.io.FileInputStream; 5 6 import java.io.FileNotFoundException; 6 import java.io.FileReader;7 7 import java.io.IOException; 8 import java.io.InputStreamReader; 8 9 import java.util.Collection; 9 10 import java.util.HashMap; … … 48 49 @Test 49 50 public void test() throws IOException, FileNotFoundException { 50 BufferedReader in = new BufferedReader(new FileReader("data_nodist/projection-reference-data.csv"));51 BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream("data_nodist/projection-reference-data.csv"), Utils.UTF_8)); 51 52 StringBuilder fail = new StringBuilder(); 52 53 String line; … … 92 93 throw new AssertionError(fail.toString()); 93 94 } 94 95 95 } 96 96 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r6881 r6995 5 5 import java.io.BufferedWriter; 6 6 import java.io.File; 7 import java.io.FileInputStream; 7 8 import java.io.FileNotFoundException; 8 import java.io.FileReader; 9 import java.io.FileWriter; 9 import java.io.FileOutputStream; 10 10 import java.io.IOException; 11 import java.io.InputStreamReader; 12 import java.io.OutputStreamWriter; 11 13 import java.util.ArrayList; 12 14 import java.util.Collection; … … 29 31 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 30 32 import org.openstreetmap.josm.tools.Pair; 33 import org.openstreetmap.josm.tools.Utils; 31 34 32 35 /** … … 87 90 88 91 Random rand = new Random(); 89 BufferedWriter out = new BufferedWriter(new FileWriter(PROJECTION_DATA_FILE));92 BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(PROJECTION_DATA_FILE), Utils.UTF_8)); 90 93 out.write("# Data for test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java\n"); 91 94 out.write("# Format: 1. Projection code; 2. lat/lon; 3. lat/lon projected -> east/north; 4. east/north (3.) inverse projected\n"); … … 112 115 113 116 private static List<TestData> readData() throws IOException, FileNotFoundException { 114 BufferedReader in = new BufferedReader(new FileReader(PROJECTION_DATA_FILE));117 BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), Utils.UTF_8)); 115 118 List<TestData> result = new ArrayList<TestData>(); 116 119 String line;
Note:
See TracChangeset
for help on using the changeset viewer.