Changeset 9739 in josm for trunk/test/unit
- Timestamp:
- 2016-02-04T22:14:23+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
r9401 r9739 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import java.util.Date; 6 7 import java.util.TimeZone; 7 8 … … 74 75 DateUtils.fromString("2014-"); 75 76 } 77 78 /** 79 * Tests that formatting a date w/ milliseconds does not cause incorrect parsing afterwards 80 */ 81 @Test 82 public void testFormattingMillisecondsDoesNotCauseIncorrectParsing() { 83 DateUtils.fromDate(new Date(123)); 84 assertEquals(1453694709000L, DateUtils.fromString("2016-01-25T04:05:09.000Z").getTime()); 85 assertEquals(1453694709200L, DateUtils.fromString("2016-01-25T04:05:09.200Z").getTime()); 86 assertEquals(1453694709400L, DateUtils.fromString("2016-01-25T04:05:09.400Z").getTime()); 87 } 76 88 }
Note:
See TracChangeset
for help on using the changeset viewer.