Skip to content

Commit

Permalink
remove cycleway:<side>:lane when selecting "unspecified lane" (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Nov 8, 2024
1 parent 05ebc52 commit 874d313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private fun CyclewayAndDirection.applyTo(tags: Tags, isRight: Boolean, isLeftHan
}
UNSPECIFIED_LANE -> {
tags[cyclewayKey] = "lane"
// does not remove any cycleway:lane tag because this value is not considered explicit
tags.remove("$cyclewayKey:lane")
}
ADVISORY_LANE -> {
tags[cyclewayKey] = "lane"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ class CyclewayCreatorKtTest {
)
}

@Test fun `apply unspecified cycle lane answer does not remove previous specific lane answer`() {
@Test fun `apply unspecified cycle lane answer does remove previous specific lane answer`() {
assertEquals(
setOf(
StringMapEntryAdd("cycleway:both", "lane"),
StringMapEntryModify("cycleway:both:lane", "exclusive", "exclusive"),
StringMapEntryDelete("cycleway:both:lane", "exclusive"),
),
cycleway(UNSPECIFIED_LANE, UNSPECIFIED_LANE).appliedTo(mapOf(
"cycleway:both:lane" to "exclusive"
Expand Down

0 comments on commit 874d313

Please sign in to comment.