Changeset 10171 in josm
- Timestamp:
- 2016-05-10T01:31:36+02:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r10057 r10171 653 653 <target name="checkstyle" depends="init-properties"> 654 654 <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" 655 classpath="tools/checkstyle/checkstyle-6.1 7-all.jar"/>655 classpath="tools/checkstyle/checkstyle-6.18-all.jar"/> 656 656 <checkstyle config="tools/checkstyle/josm_checks.xml"> 657 657 <fileset dir="${base.dir}/src/org/openstreetmap/josm" includes="**/*.java" -
trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
r10165 r10171 124 124 return builder 125 125 .add(BigDecimal.valueOf(c.getX()).setScale(11, RoundingMode.HALF_UP)) 126 .add(BigDecimal.valueOf(c.getY()).setScale(11, RoundingMode.HALF_UP)) 127 ; 126 .add(BigDecimal.valueOf(c.getY()).setScale(11, RoundingMode.HALF_UP)); 128 127 } 129 128 -
trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java
r10165 r10171 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.io; 3 4 import static org.junit.Assert.assertEquals; 3 5 4 6 import org.junit.BeforeClass; … … 11 13 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 12 14 13 import static org.hamcrest.CoreMatchers.*; 14 import static org.junit.Assert.*; 15 15 /** 16 * Unit tests of {@link GeoJSONWriter} class. 17 */ 16 18 public class GeoJSONWriterTest { 17 19 … … 24 26 } 25 27 28 /** 29 * Unit test 30 */ 26 31 @Test 27 public void testPoint() throws Exception{32 public void testPoint() { 28 33 final Node node = new Node(new LatLon(12.3, 4.56)); 29 34 node.put("name", "foo"); … … 33 38 final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null); 34 39 final GeoJSONWriter writer = new GeoJSONWriter(layer, ProjectionPreference.wgs84.getProjection()); 35 assert That(writer.write().trim(), is(("" +40 assertEquals(("" + 36 41 "{\n" + 37 42 " 'type':'FeatureCollection',\n" + … … 59 64 " }\n" + 60 65 " ]\n" + 61 "}").replace("'", "\"") ));66 "}").replace("'", "\""), writer.write().trim()); 62 67 } 63 68 }
Note:
See TracChangeset
for help on using the changeset viewer.