- Timestamp:
- 2013-09-09T01:12:38+02:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
r6203 r6226 116 116 public int hashCode() { 117 117 final int prime = 31; 118 int result = super.hashCode();118 int result = 1; 119 119 long temp; 120 120 temp = java.lang.Double.doubleToLongBits(x); -
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r6137 r6226 150 150 * @param capacity 151 151 * @param safeIterator If set to false, you must not modify the Storage 152 * while iterating over it. If set to true, you can sa vely152 * while iterating over it. If set to true, you can safely 153 153 * modify, but the read-only iteration will happen on a copy 154 154 * of the unmodified Storage. -
trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
r4580 r6226 21 21 }; 22 22 23 /** 24 * Test of {@link LatLon#roundToOsmPrecisionStrict} 25 */ 23 26 @Test 24 public void roundingTests() {27 public void testRoundToOsmPrecisionStrict() { 25 28 26 29 for (double value : sampleValues) { … … 74 77 } 75 78 79 /** 80 * Test of {@link LatLon#toIntervalLon} 81 */ 76 82 @Test 77 public void t oIntervalLonTests() {83 public void testToIntervalLon() { 78 84 assertEquals(-180.0, LatLon.toIntervalLon(-180.0), 0); 79 85 assertEquals(0.0, LatLon.toIntervalLon(0.0), 0); … … 95 101 assertEquals(179.0, LatLon.toIntervalLon(-541.0), 0); 96 102 } 103 104 /** 105 * Test of {@link LatLon#equals} 106 */ 107 @Test 108 public void testEquals() { 109 for (int i = 1; i < sampleValues.length; i++) { 110 LatLon a = new LatLon(sampleValues[i-1], sampleValues[i]); 111 LatLon b = new LatLon(sampleValues[i-1], sampleValues[i]); 112 assertEquals(a, b); 113 } 114 } 115 116 /** 117 * Test of {@link LatLon#hashCode} 118 */ 119 @Test 120 public void testHashCode() { 121 for (int i = 1; i < sampleValues.length; i++) { 122 LatLon a = new LatLon(sampleValues[i-1], sampleValues[i]); 123 LatLon b = new LatLon(sampleValues[i-1], sampleValues[i]); 124 assertEquals(a.hashCode(), b.hashCode()); 125 } 126 } 97 127 }
Note:
See TracChangeset
for help on using the changeset viewer.