Ignore:
Timestamp:
2016-11-17T21:00:49+01:00 (7 years ago)
Author:
michael2402
Message:

See #13361: Cleanup code and formatting

  • Add javadoc to public methods
  • Add @since tag to newer methods
  • Do not use if (...) return true; else return false;
  • Remove parentheses if they are not required
  • Use blocks for if-statements which is more consistent with most of JOSM code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java

    r11269 r11272  
    5252        assertTrue(b1.bounds(b2));
    5353
    54         // invalid latlon values
    55         LatLon invalid1 = new LatLon(-190, 340);
    56         BBox b3 = new BBox(invalid1, latLon1);
    57         BBox b4 = new BBox(latLon1, invalid1);
    58         BBox b5 = new BBox(invalid1, invalid1);
    59         // what should be the result?
     54        // outside of world latlon values
     55        LatLon outOfWorld = new LatLon(-190, 340);
     56        BBox b3 = new BBox(outOfWorld, latLon1);
     57        BBox b4 = new BBox(latLon1, outOfWorld);
     58        BBox b5 = new BBox(outOfWorld, outOfWorld);
     59
    6060        assertTrue(b3.isValid());
    6161        assertTrue(b4.isValid());
     
    6363        assertTrue(b4.bounds(latLon1));
    6464        assertTrue(b5.isValid());
     65        assertFalse(b3.isInWorld());
     66        assertFalse(b4.isInWorld());
    6567        assertFalse(b5.isInWorld());
    6668    }
Note: See TracChangeset for help on using the changeset viewer.