-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enable narrow gauge and miniature routes #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,7 +16,7 @@ public class RailAccessParser extends AbstractAccessParser { | |||||
|
|
||||||
| public static final String DEFAULT_NAME = "rail"; | ||||||
| private static final Set<String> ALLOWED_RAIL_TYPES = Set.of( | ||||||
| "rail", "light_rail", "tram", "subway", "construction", "proposed", "funicular", "monorail" | ||||||
| "rail", "light_rail", "tram", "subway", "construction", "proposed", "funicular", "monorail", "narrow_gauge", "miniature" | ||||||
|
||||||
| "rail", "light_rail", "tram", "subway", "construction", "proposed", "funicular", "monorail", "narrow_gauge", "miniature" | |
| "construction", "funicular", "light_rail", "miniature", "monorail", "narrow_gauge", "proposed", "rail", "subway", "tram" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -66,11 +66,29 @@ public void testRejectRoad() { | |||||
| } | ||||||
|
|
||||||
| @Test | ||||||
| public void testRejectsNarrowGauge() { | ||||||
| public void testAcceptsNarrowGauge() { | ||||||
| PMap properties = new PMap(); | ||||||
| RailAccessParser e = createAccessParser(createEncodingManager(), properties); | ||||||
| ReaderWay way = new ReaderWay(1); | ||||||
| way.setTag("railway", "narrow_gauge"); | ||||||
| assertEquals(e.getAccess(way), WayAccess.WAY); | ||||||
|
||||||
| assertEquals(e.getAccess(way), WayAccess.WAY); | |
| assertEquals(WayAccess.WAY, e.getAccess(way)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] For consistency and to avoid unexpected ordinal values, consider inserting the new enum constants in alphabetical order or documenting that the order is intentional.