Changeset 8331 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2015-05-05T22:08:03+02:00 (10 years ago)
Author:
simon04
Message:

fix #10278 - MapCSSTagChecker: preprocess MapCSS for media queries support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r8266 r8331  
    118118
    119119    @Test
     120    public void testPreprocessing() throws Exception {
     121        final MapCSSTagChecker test = buildTagChecker("" +
     122                "@media (min-josm-version: 1) { *[foo] { throwWarning: \"!\"; } }\n" +
     123                "@media (min-josm-version: 2147483647) { *[bar] { throwWarning: \"!\"; } }\n");
     124        assertThat(test.getErrorsForPrimitive(OsmUtils.createPrimitive("way foo=1"), false).size(), is(1));
     125        assertThat(test.getErrorsForPrimitive(OsmUtils.createPrimitive("way bar=1"), false).size(), is(0));
     126    }
     127
     128    @Test
    120129    public void testInit() throws Exception {
    121130        MapCSSTagChecker c = new MapCSSTagChecker();
Note: See TracChangeset for help on using the changeset viewer.