Hi Gerd

I've re-enabled the nightly builds but the last one is 2447 as from 2448
there are test failures.

One is because the roads are now added right at the end and the
test does not call the converted end() method. The attached
patch fixes that.

The other is partially the same, but it appears that the resulting
ways are also removed by the removeShortArcs routine.

..Steve
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 2448)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision )
@@ -328,8 +328,8 @@
 			GType gt = roadTypes.get(i);
 			addRoad(road, gt);
 		}
-		roads = null;
-		roadTypes = null;
+		roads = new ArrayList<Way>();
+		roadTypes = new ArrayList<GType>();
 		Collection<List<RestrictionRelation>> lists = restrictions.values();
 		for (List<RestrictionRelation> l : lists) {
 
Index: test/uk/me/parabola/mkgmap/osmstyle/StyledConverterTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- test/uk/me/parabola/mkgmap/osmstyle/StyledConverterTest.java	(revision 2448)
+++ test/uk/me/parabola/mkgmap/osmstyle/StyledConverterTest.java	(revision )
@@ -187,6 +187,7 @@
 		Way w = makeWay();
 		w.addTag("highway", "pedestrian");
 		converter.convertWay(w);
+		converter.end();
 
 		assertEquals("lines converted", 1, lines.size());
 
Index: src/uk/me/parabola/mkgmap/main/StyleTester.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/main/StyleTester.java	(revision 2448)
+++ src/uk/me/parabola/mkgmap/main/StyleTester.java	(revision )
@@ -236,11 +236,13 @@
 			for (Way w : ways) {
 				String prefix = "WAY " + w.getId() + ": ";
 				normal.convertWay(w.copy());
+				normal.end();
 				String[] actual = formatResults(prefix, results);
 				all.addAll(Arrays.asList(actual));
 				results.clear();
 
 				strict.convertWay(w.copy());
+				strict.end();
 				String[] expected = formatResults(prefix, strictResults);
 				strictResults.clear();
 
@@ -285,6 +287,7 @@
 	}
 
 	public void end() {
+		converter.end();
 	}
 
 
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to