Changeset 11838 in josm for trunk/test
- Timestamp:
- 2017-04-04T16:50:06+02:00 (8 years ago)
- Location:
- trunk/test
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java
r11324 r11838 112 112 component.zoomTo(new LatLon(10, 10)); 113 113 Point2D shouldBeCenter = component.getPoint2D(new LatLon(10, 10)); 114 assertThat(shouldBeCenter, CustomMatchers.is(new Point2D.Double(WIDTH / 2, HEIGHT / 2))); 114 // center may move 0.5 pixels for alignment, see {@link NavigatableComponent#zoomTo(EastNorth, double, boolean)} 115 assertEquals(shouldBeCenter.getX(), WIDTH / 2., 0.5); 116 assertEquals(shouldBeCenter.getY(), HEIGHT / 2., 0.5); 115 117 } 116 118 … … 126 128 component.zoomToFactor(0.5); 127 129 assertEquals(initialScale / 2, component.getScale(), 0.00000001); 128 assert Equals(center, component.getCenter());130 assertThat(component.getCenter(), CustomMatchers.is(center)); 129 131 component.zoomToFactor(2); 130 132 assertEquals(initialScale, component.getScale(), 0.00000001); 131 assert Equals(center, component.getCenter());133 assertThat(component.getCenter(), CustomMatchers.is(center)); 132 134 133 135 // zoomToFactor(EastNorth, double)
Note:
See TracChangeset
for help on using the changeset viewer.