Ignore:
Timestamp:
2020-07-15T18:58:09+02:00 (4 years ago)
Author:
stoecker
Message:

fix #19508 - better reversal function for number, patch by gaben

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java

    r16182 r16771  
    5959            assertSwitch(new Tag(k, "something"), new Tag(k, "something"));
    6060        }
     61        // numbered incline (see #19508)
     62        assertSwitch(new Tag("incline", "+0%"), new Tag("incline", "0%"));
     63        assertSwitch(new Tag("incline", ".1%"), new Tag("incline", "-.1%"));
     64        assertSwitch(new Tag("incline", "-10.0%"), new Tag("incline", "10.0%"));
     65        assertSwitch(new Tag("incline", "0,6°"), new Tag("incline", "-0.6°"));
    6166        // direction=forward/backward/...
    6267        assertSwitch(new Tag("direction", "forward"), new Tag("direction", "backward"));
     
    100105
    101106    private void assertSwitch(Tag oldTag, Tag newTag) {
    102         Assert.assertEquals(ReverseWayTagCorrector.TagSwitcher.apply(oldTag), newTag);
     107        Assert.assertEquals(newTag, ReverseWayTagCorrector.TagSwitcher.apply(oldTag));
    103108    }
    104109
Note: See TracChangeset for help on using the changeset viewer.