Changeset 6422 in josm for trunk/test
- Timestamp:
- 2013-11-29T00:10:15+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/SystemOfMeasurementTest.java
r5870 r6422 8 8 import org.openstreetmap.josm.data.Preferences; 9 9 import org.openstreetmap.josm.gui.NavigatableComponent.SystemOfMeasurement; 10 11 import java.text.DecimalFormat; 12 import java.text.DecimalFormatSymbols; 13 import java.util.Locale; 10 14 11 15 /** … … 63 67 } 64 68 69 @Test 70 public void testGetDistTextLocalized() { 71 final DecimalFormat format = new DecimalFormat("0.000", DecimalFormatSymbols.getInstance(Locale.GERMAN)); 72 assertEquals("0,001 m", NavigatableComponent.METRIC_SOM.getDistText(0.001, format, 1e-6)); 73 assertEquals("< 0,010 m", NavigatableComponent.METRIC_SOM.getDistText(0.001, format, 0.01)); 74 assertEquals("10,051 m", NavigatableComponent.METRIC_SOM.getDistText(10.0514, format, 0.01)); 75 assertEquals("10,052 m", NavigatableComponent.METRIC_SOM.getDistText(10.0515, format, 0.01)); 76 assertEquals("100,000 km", NavigatableComponent.METRIC_SOM.getDistText(100000.0, format, 0.01)); 77 } 78 65 79 /** 66 80 * Test of {@link SystemOfMeasurement#getAreaText} method.
Note:
See TracChangeset
for help on using the changeset viewer.