Changeset 9214 in josm for trunk/test/unit/org/openstreetmap/josm/data
- Timestamp:
- 2015-12-29T19:23:48+01:00 (11 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data
- Files:
-
- 10 edited
-
BoundsTest.java (modified) (1 diff)
-
osm/DataSetMergerTest.java (modified) (26 diffs)
-
osm/FilterTest.java (modified) (1 diff)
-
osm/OsmPrimitiveKeyHandlingTest.java (modified) (2 diffs)
-
osm/OsmPrimitiveTest.java (modified) (7 diffs)
-
osm/WaySegmentTest.java (modified) (1 diff)
-
osm/history/HistoryNodeTest.java (modified) (1 diff)
-
osm/visitor/MergeSourceBuildingVisitorTest.java (modified) (1 diff)
-
validation/tests/HighwaysTest.groovy (modified) (1 diff)
-
validation/tests/SimilarNamedWaysTest.groovy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java
r8509 r9214 41 41 assertTrue(b3.intersects(b2)); 42 42 43 b3.extend( new LatLon(0, 0));43 b3.extend(LatLon.ZERO); 44 44 assertEquals(b3, new Bounds(0, 0, 90, -170)); 45 45 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r8857 r9214 81 81 @Test 82 82 public void nodeSimple_IdenticalNoConflict() { 83 Node n = new Node( new LatLon(0, 0));83 Node n = new Node(LatLon.ZERO); 84 84 n.setOsmId(1, 1); 85 85 n.setModified(false); … … 87 87 my.addPrimitive(n); 88 88 89 Node n1 = new Node( new LatLon(0, 0));89 Node n1 = new Node(LatLon.ZERO); 90 90 n1.setOsmId(1, 1); 91 91 n1.setModified(false); … … 116 116 @Test 117 117 public void nodeSimple_locallyUnmodifiedNoConflict() { 118 Node n = new Node( new LatLon(0, 0));118 Node n = new Node(LatLon.ZERO); 119 119 n.setOsmId(1, 1); 120 120 n.setModified(false); … … 122 122 my.addPrimitive(n); 123 123 124 Node n1 = new Node( new LatLon(0, 0));124 Node n1 = new Node(LatLon.ZERO); 125 125 n1.setOsmId(1, 2); 126 126 n1.setModified(false); … … 156 156 @Test 157 157 public void nodeSimple_TagConflict() { 158 Node n = new Node( new LatLon(0, 0));158 Node n = new Node(LatLon.ZERO); 159 159 n.setOsmId(1, 1); 160 160 n.setModified(true); … … 163 163 my.addPrimitive(n); 164 164 165 Node n1 = new Node( new LatLon(0, 0));165 Node n1 = new Node(LatLon.ZERO); 166 166 n1.setOsmId(1, 2); 167 167 n1.setModified(false); … … 191 191 public void nodeSimple_DeleteConflict() { 192 192 Node n = new Node(1, 1); 193 n.setCoor( new LatLon(0, 0));193 n.setCoor(LatLon.ZERO); 194 194 n.setDeleted(true); 195 195 n.put("key1", "value1"); 196 196 my.addPrimitive(n); 197 197 198 Node n1 = new Node( new LatLon(0, 0));198 Node n1 = new Node(LatLon.ZERO); 199 199 n1.setOsmId(1, 2); 200 200 n1.setModified(false); … … 221 221 @Test 222 222 public void nodeSimple_DeleteConflict_2() { 223 Node n = new Node( new LatLon(0, 0));223 Node n = new Node(LatLon.ZERO); 224 224 n.setOsmId(1, 1); 225 225 n.setDeleted(true); 226 226 my.addPrimitive(n); 227 227 228 Node n1 = new Node( new LatLon(0, 0));228 Node n1 = new Node(LatLon.ZERO); 229 229 n1.setOsmId(1, 1); 230 230 their.addPrimitive(n1); … … 307 307 308 308 Node n = new Node(); 309 n.setCoor( new LatLon(0, 0));309 n.setCoor(LatLon.ZERO); 310 310 n.put("key1", "value1"); 311 311 n.setUser(myUser); … … 315 315 316 316 Node n1 = new Node(); 317 n1.setCoor( new LatLon(0, 0));317 n1.setCoor(LatLon.ZERO); 318 318 n1.put("key1", "value1"); 319 319 cal.add(Calendar.HOUR, 1); … … 349 349 350 350 Node n1 = new Node(); 351 n1.setCoor( new LatLon(0, 0));351 n1.setCoor(LatLon.ZERO); 352 352 n1.setOsmId(1, 1); 353 353 n1.put("key1", "value1"); … … 380 380 381 381 Node n1 = new Node(); 382 n1.setCoor( new LatLon(0, 0));382 n1.setCoor(LatLon.ZERO); 383 383 n1.setOsmId(1, 1); 384 384 my.addPrimitive(n1); 385 385 386 386 Node n2 = new Node(); 387 n2.setCoor( new LatLon(0, 0));387 n2.setCoor(LatLon.ZERO); 388 388 n2.setOsmId(2, 1); 389 389 … … 399 399 // -- the source data set 400 400 401 Node n3 = new Node( new LatLon(0, 0));401 Node n3 = new Node(LatLon.ZERO); 402 402 n3.setOsmId(1, 1); 403 403 their.addPrimitive(n3); … … 452 452 // -- my data set 453 453 454 Node n1 = new Node( new LatLon(0, 0));454 Node n1 = new Node(LatLon.ZERO); 455 455 n1.setOsmId(1, 1); 456 456 my.addPrimitive(n1); … … 468 468 // --- their data set 469 469 470 Node n3 = new Node( new LatLon(0, 0));470 Node n3 = new Node(LatLon.ZERO); 471 471 n3.setOsmId(1, 1); 472 472 their.addPrimitive(n3); … … 522 522 // -- the target dataset 523 523 524 Node n1 = new Node( new LatLon(0, 0));524 Node n1 = new Node(LatLon.ZERO); 525 525 n1.setOsmId(1, 1); 526 526 my.addPrimitive(n1); … … 541 541 // -- the source dataset 542 542 543 Node n3 = new Node( new LatLon(0, 0));543 Node n3 = new Node(LatLon.ZERO); 544 544 n3.setOsmId(1, 1); 545 545 their.addPrimitive(n3); … … 585 585 public void waySimple_TheirVersionNotVisibleMyIsModified() { 586 586 587 Node mn1 = new Node( new LatLon(0, 0));587 Node mn1 = new Node(LatLon.ZERO); 588 588 mn1.setOsmId(1, 1); 589 589 my.addPrimitive(mn1); … … 630 630 // -- my data set 631 631 632 Node n1 = new Node( new LatLon(0, 0));632 Node n1 = new Node(LatLon.ZERO); 633 633 n1.setOsmId(1, 1); 634 634 my.addPrimitive(n1); … … 645 645 // -- their data set 646 646 647 Node n3 = new Node( new LatLon(0, 0));647 Node n3 = new Node(LatLon.ZERO); 648 648 n3.setOsmId(1, 1); 649 649 their.addPrimitive(n3); … … 688 688 // -- my data set 689 689 690 Node n1 = new Node( new LatLon(0, 0));690 Node n1 = new Node(LatLon.ZERO); 691 691 my.addPrimitive(n1); 692 692 … … 701 701 // -- their data set 702 702 703 Node n3 = new Node( new LatLon(0, 0));703 Node n3 = new Node(LatLon.ZERO); 704 704 their.addPrimitive(n3); 705 705 … … 744 744 // -- my dataset 745 745 746 Node mn1 = new Node( new LatLon(0, 0));746 Node mn1 = new Node(LatLon.ZERO); 747 747 mn1.setOsmId(1, 1); 748 748 mn1.setDeleted(true); 749 749 my.addPrimitive(mn1); 750 750 751 Node tn1 = new Node( new LatLon(0, 0));751 Node tn1 = new Node(LatLon.ZERO); 752 752 tn1.setOsmId(1, 1); 753 753 their.addPrimitive(tn1); … … 797 797 public void relationComplex_mergingADeletedNode() { 798 798 799 Node mn1 = new Node( new LatLon(0, 0));799 Node mn1 = new Node(LatLon.ZERO); 800 800 mn1.setOsmId(1, 1); 801 801 mn1.setDeleted(true); … … 803 803 804 804 805 Node tn1 = new Node( new LatLon(0, 0));805 Node tn1 = new Node(LatLon.ZERO); 806 806 tn1.setOsmId(1, 1); 807 807 their.addPrimitive(tn1); … … 903 903 their.addPrimitive(w3); 904 904 905 Node n4 = new Node( new LatLon(0, 0));905 Node n4 = new Node(LatLon.ZERO); 906 906 n4.setOsmId(1, 1); 907 907 my.addPrimitive(n4); -
trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
r8857 r9214 40 40 public void basic() throws ParseError { 41 41 DataSet ds = new DataSet(); 42 Node n1 = new Node( new LatLon(0, 0));42 Node n1 = new Node(LatLon.ZERO); 43 43 n1.put("amenity", "parking"); 44 Node n2 = new Node( new LatLon(0, 0));44 Node n2 = new Node(LatLon.ZERO); 45 45 n2.put("fixme", "continue"); 46 46 ds.addPrimitive(n1); -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
r8857 r9214 119 119 public void hasEqualSemanticAttributes() { 120 120 Node n1 = new Node(1); 121 n1.setCoor( new LatLon(0, 0));121 n1.setCoor(LatLon.ZERO); 122 122 n1.put("key.1", "value.1"); 123 123 n1.put("key.2", "value.2"); 124 124 125 125 Node n2 = new Node(1); 126 n2.setCoor( new LatLon(0, 0));126 n2.setCoor(LatLon.ZERO); 127 127 n2.put("key.2", "value.2"); 128 128 n2.put("key.1", "value.1"); … … 137 137 public void hasEqualSemanticAttributes_2() { 138 138 Node n1 = new Node(1); 139 n1.setCoor( new LatLon(0, 0));139 n1.setCoor(LatLon.ZERO); 140 140 n1.put("key.1", "value.1"); 141 141 n1.put("key.2", "value.3"); 142 142 143 143 Node n2 = new Node(1); 144 n2.setCoor( new LatLon(0, 0));144 n2.setCoor(LatLon.ZERO); 145 145 n2.put("key.1", "value.1"); 146 146 n2.put("key.2", "value.4"); -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java
r8857 r9214 40 40 @Test 41 41 public void simpleReferrersTest() { 42 Node n1 = new Node( new LatLon(0.0, 0.0));42 Node n1 = new Node(LatLon.ZERO); 43 43 Way w1 = new Way(); 44 44 w1.addNode(n1); … … 50 50 @Test 51 51 public void addAndRemoveReferrer() { 52 Node n1 = new Node( new LatLon(0.0, 0.0));53 Node n2 = new Node( new LatLon(0.0, 0.0));52 Node n1 = new Node(LatLon.ZERO); 53 Node n2 = new Node(LatLon.ZERO); 54 54 Way w1 = new Way(); 55 55 w1.addNode(n1); … … 66 66 @Test 67 67 public void multipleReferrers() { 68 Node n1 = new Node( new LatLon(0.0, 0.0));68 Node n1 = new Node(LatLon.ZERO); 69 69 Way w1 = new Way(); 70 70 Way w2 = new Way(); … … 82 82 @Test 83 83 public void removeMemberFromRelationReferrerTest() { 84 Node n1 = new Node( new LatLon(0, 0));84 Node n1 = new Node(LatLon.ZERO); 85 85 Relation r1 = new Relation(); 86 86 r1.addMember(new RelationMember("", n1)); … … 94 94 @Test 95 95 public void setRelationMemberReferrerTest() { 96 Node n1 = new Node( new LatLon(0, 0));97 Node n2 = new Node( new LatLon(0, 0));96 Node n1 = new Node(LatLon.ZERO); 97 Node n2 = new Node(LatLon.ZERO); 98 98 Relation r1 = new Relation(); 99 99 Relation r2 = new Relation(); … … 111 111 @Test 112 112 public void removePrimitiveReferrerTest() { 113 Node n1 = new Node( new LatLon(0.0, 0.0));113 Node n1 = new Node(LatLon.ZERO); 114 114 Way w1 = new Way(); 115 115 w1.addNode(n1); … … 134 134 public void nodeFromMultipleDatasets() { 135 135 // n has two referrers - w1 and w2. But only w1 is returned because it is in the same dataset as n 136 Node n = new Node( new LatLon(0.0, 0.0));136 Node n = new Node(LatLon.ZERO); 137 137 138 138 Way w1 = new Way(); -
trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java
r8997 r9214 20 20 public void testForNodePair() throws Exception { 21 21 final DataSet ds = new DataSet(); 22 final Node n1 = new Node( new LatLon(0, 0));22 final Node n1 = new Node(LatLon.ZERO); 23 23 final Node n2 = new Node(new LatLon(1, 0)); 24 24 final Node n3 = new Node(new LatLon(2, 0)); -
trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java
r9203 r9214 39 39 4L, // changesetId 40 40 d, // timestamp 41 new LatLon(0, 0)41 LatLon.ZERO 42 42 ); 43 43 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r8857 r9214 165 165 Relation r1 = new Relation(1, 1); 166 166 Node n20 = new Node(20, 1); 167 n20.setCoor( new LatLon(0, 0));167 n20.setCoor(LatLon.ZERO); 168 168 r1.addMember(new RelationMember("node-20", n20)); 169 169 Way w30 = new Way(30, 1); -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/HighwaysTest.groovy
r8941 r9214 18 18 def ds = new DataSet() 19 19 20 def n00 = new Node( new LatLon(0, 0))20 def n00 = new Node(LatLon.ZERO) 21 21 def n10 = new Node(new LatLon(1, 0)) 22 22 def n20 = new Node(new LatLon(2, 0)) -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SimilarNamedWaysTest.groovy
r7938 r9214 23 23 def ds = new DataSet() 24 24 25 def n00 = new Node( new LatLon(0, 0))25 def n00 = new Node(LatLon.ZERO) 26 26 def n10 = new Node(new LatLon(1, 0)) 27 27 def n20 = new Node(new LatLon(2, 0))
Note:
See TracChangeset
for help on using the changeset viewer.
