Changeset 9672 in josm for trunk/test
- Timestamp:
- 2016-01-29T19:53:36+01:00 (9 years ago)
- Location:
- trunk/test
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
r9499 r9672 6 6 7 7 import java.io.File; 8 import java.io.IOException; 8 9 import java.text.DecimalFormat; 9 10 import java.text.ParseException; … … 16 17 import org.junit.Before; 17 18 import org.junit.Test; 19 import org.openstreetmap.josm.TestUtils; 18 20 import org.openstreetmap.josm.data.coor.LatLon; 19 21 import org.openstreetmap.josm.tools.date.DateUtilsTest; … … 49 51 /** 50 52 * Tests reading sub-seconds from the EXIF header 51 * @throws ParseException 53 * @throws ParseException if {@link ExifReader#readTime} fails to parse date/time of sample file 52 54 */ 53 55 @Test … … 80 82 81 83 /** 82 * Test coordinatesextraction84 * Test direction extraction 83 85 */ 84 86 @Test … … 87 89 assertEquals(new Double(46.5), direction); 88 90 } 91 92 /** 93 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/11685">#11685</a> 94 * @throws IOException if an error occurs during reading 95 */ 96 @Test 97 public void testTicket11685() throws IOException { 98 File file = new File(TestUtils.getRegressionDataFile(11685, "2015-11-08_15-33-27-Xiaomi_YI-Y0030832.jpg")); 99 String dateStr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").format(ExifReader.readTime(file)); 100 assertEquals("2015-11-08T15:33:27.500", dateStr); 101 } 89 102 }
Note:
See TracChangeset
for help on using the changeset viewer.