Changeset 32383 in osm for applications/editors/josm/plugins/mapillary/test
- Timestamp:
- 2016-06-23T17:42:43+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/ImportTest.java
r32034 r32383 28 28 File image = new File("images/icon16.png"); 29 29 MapillaryImportedImage img = ImageUtil.readImagesFrom(image, new LatLon(0, 0)).get(0); 30 assertEquals(0, img.getCa(), 0.01); 31 assertTrue(new LatLon(0, 0).equalsEpsilon(img.getLatLon())); 30 assertEquals(0, img.getMovingCa(), 0.01); 31 assertTrue(new LatLon(0, 0).equalsEpsilon(img.getMovingLatLon())); 32 32 } 33 33 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecordTest.java
r32065 r32383 120 120 this.record.addCommand(cmd1); 121 121 122 assertEquals(0.1, this.img1.getLatLon().lat(), 0.01); 123 124 this.record.undo(); 125 126 assertEquals(0.0, this.img1.getLatLon().lat(), 0.01); 127 128 this.record.redo(); 129 130 assertEquals(0.1, this.img1.getLatLon().lat(), 0.01); 131 132 this.record.addCommand(cmd2); 133 this.record.undo(); 134 135 assertEquals(-0.1, this.img1.getLatLon().lat(), 0.01); 136 137 this.record.redo(); 138 139 assertEquals(0.1, this.img1.getLatLon().lat(), 0.01); 122 assertEquals(0.1, this.img1.getMovingLatLon().lat(), 0.01); 123 124 this.record.undo(); 125 126 assertEquals(0.0, this.img1.getMovingLatLon().lat(), 0.01); 127 128 this.record.redo(); 129 130 assertEquals(0.1, this.img1.getMovingLatLon().lat(), 0.01); 131 132 this.record.addCommand(cmd2); 133 this.record.undo(); 134 135 assertEquals(-0.1, this.img1.getMovingLatLon().lat(), 0.01); 136 137 this.record.redo(); 138 139 assertEquals(0.1, this.img1.getMovingLatLon().lat(), 0.01); 140 140 } 141 141 … … 155 155 this.record.undo(); 156 156 157 assertEquals(-0.1, this.img1.getCa(), 0.01); 158 159 this.record.redo(); 160 161 assertEquals(0.1, this.img1.getCa(), 0.01); 162 163 this.record.addCommand(cmd2); 164 this.record.undo(); 165 166 assertEquals(-0.2, this.img1.getCa(), 0.01); 167 168 this.record.redo(); 169 170 assertEquals(0.1, this.img1.getCa(), 0.01); 157 assertEquals(-0.1, this.img1.getMovingCa(), 0.01); 158 159 this.record.redo(); 160 161 assertEquals(0.1, this.img1.getMovingCa(), 0.01); 162 163 this.record.addCommand(cmd2); 164 this.record.undo(); 165 166 assertEquals(-0.2, this.img1.getMovingCa(), 0.01); 167 168 this.record.redo(); 169 170 assertEquals(0.1, this.img1.getMovingCa(), 0.01); 171 171 } 172 172 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/ImageUtilsTest.java
r32053 r32383 23 23 List<MapillaryImportedImage> images = ImageUtil.readImagesFrom(untaggedFile, defaultLL); 24 24 assertEquals(1, images.size()); 25 assertEquals(0, images.get(0).getCa(), 1e-9); 26 assertEquals(defaultLL, images.get(0).getLatLon()); 25 assertEquals(0, images.get(0).getMovingCa(), 1e-9); 26 assertEquals(defaultLL, images.get(0).getMovingLatLon()); 27 27 assertEquals(untaggedFile, images.get(0).getFile()); 28 28 long endTime = System.currentTimeMillis() / 1000 * 1000 + 1000; // Rounding to next full second … … 37 37 List<MapillaryImportedImage> images = ImageUtil.readImagesFrom(untaggedFile, defaultLL); 38 38 assertEquals(1, images.size()); 39 assertEquals(0, images.get(0).getCa(), 1e-9); 40 assertEquals(55.6052777777, images.get(0).getLatLon().lat(), 1e-9); 41 assertEquals(13.0001388888, images.get(0).getLatLon().lon(), 1e-9); 39 assertEquals(0, images.get(0).getMovingCa(), 1e-9); 40 assertEquals(55.6052777777, images.get(0).getMovingLatLon().lat(), 1e-9); 41 assertEquals(13.0001388888, images.get(0).getMovingLatLon().lon(), 1e-9); 42 42 assertEquals(untaggedFile, images.get(0).getFile()); 43 43 long endTime = System.currentTimeMillis() / 1000 * 1000 + 1000; // Rounding to next full second … … 52 52 List<MapillaryImportedImage> images = ImageUtil.readImagesFrom(untaggedFile, defaultLL); 53 53 assertEquals(1, images.size()); 54 assertEquals(42.73, images.get(0).getCa(), 1e-9); 55 assertEquals(defaultLL, images.get(0).getLatLon()); 54 assertEquals(42.73, images.get(0).getMovingCa(), 1e-9); 55 assertEquals(defaultLL, images.get(0).getMovingLatLon()); 56 56 assertEquals(untaggedFile, images.get(0).getFile()); 57 57 long endTime = System.currentTimeMillis() / 1000 * 1000 + 1000; // Rounding to next full second … … 66 66 List<MapillaryImportedImage> images = ImageUtil.readImagesFrom(untaggedFile, defaultLL); 67 67 assertEquals(1, images.size()); 68 assertEquals(0, images.get(0).getCa(), 1e-9); 69 assertEquals(defaultLL, images.get(0).getLatLon()); 68 assertEquals(0, images.get(0).getMovingCa(), 1e-9); 69 assertEquals(defaultLL, images.get(0).getMovingLatLon()); 70 70 assertEquals(untaggedFile, images.get(0).getFile()); 71 71 /* http://www.wolframalpha.com/input/?i=convert+2015-12-24T01%3A02%3A03%2B0000+to+unixtime */
Note:
See TracChangeset
for help on using the changeset viewer.