Changeset 3056 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r3042 r3056 955 955 // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example 956 956 // when way is cloned 957 checkDataset(); 957 958 List<OsmPrimitive> result = new ArrayList<OsmPrimitive>(); 958 959 if (referrers != null) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java
r2407 r3056 110 110 } 111 111 112 @Test 113 public void nodeFromMultipleDatasets() { 114 // n has two referrers - w1 and w2. But only w1 is returned because it is in the same dataset as n 115 Node n = new Node(); 116 117 Way w1 = new Way(); 118 w1.addNode(n); 119 dataSet.addPrimitive(n); 120 dataSet.addPrimitive(w1); 121 new Way(w1); 122 123 Assert.assertEquals(n.getReferrers().size(), 1); 124 Assert.assertEquals(n.getReferrers().get(0), w1); 125 } 126 127 @Test(expected=DataIntegrityProblemException.class) 128 public void checkMustBeInDatasate() { 129 Node n = new Node(); 130 n.getReferrers(); 131 } 132 112 133 }
Note:
See TracChangeset
for help on using the changeset viewer.