Changeset 12990 in josm


Ignore:
Timestamp:
2017-10-12T22:17:38+02:00 (2 months ago)
Author:
bastiK
Message:

see #15410 - update tests + minor fixes (2)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r12989 r12990  
    10061006     * @param def default value
    10071007     * @return a Color object for the configured colour, or the default value if none configured.
    1008      * @deprecated Use a {@link ColorProperty} instead.
     1008     * @deprecated Use a {@link NamedColorProperty} instead.
    10091009     */
    10101010    @Deprecated
     
    10451045     * @param def default value
    10461046     * @return a Color object for the configured colour, or the default value if none configured.
    1047      * @deprecated Use a {@link ColorProperty} instead.
    1048      * You can replace this by: <code>new ColorProperty(colName, def).getChildColor(specName)</code>
     1047     * @deprecated Use a {@link NamedColorProperty} instead.
     1048     * You can replace this by: <code>new NamedColorProperty(colName, def).getChildColor(specName)</code>
    10491049     */
    10501050    @Deprecated
     
    10951095     * @param val The color
    10961096     * @return true if the setting was modified
    1097      * @see ColorProperty#put(Color)
     1097     * @see NamedColorProperty#put(Color)
    10981098     * @deprecated (since 12987) no longer supported (see {@link NamedColorProperty})
    10991099     */
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r12989 r12990  
    141141         */
    142142        public boolean isDefault() {
    143             return info.getValue() == null || Objects.equals(info.getValue(),  info.getDefaultValue());
     143            return info.getValue() == null || Objects.equals(info.getValue(), info.getDefaultValue());
    144144        }
    145145
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/LayerTest.java

    r12989 r12990  
    5959        assertEquals(Color.BLACK, color.get());
    6060        assertEquals(Color.BLACK, color.getDefaultValue());
    61         assertEquals("color.layer.test.layer", color.getKey());
     61        assertEquals("clr.layer.Test Layer.x", color.getKey());
    6262    }
    6363
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy

    r10837 r12990  
    66import org.junit.Test
    77import org.openstreetmap.josm.JOSMFixture
    8 import org.openstreetmap.josm.Main
    98import org.openstreetmap.josm.data.coor.LatLon
    109import org.openstreetmap.josm.data.osm.DataSet
     
    308307        def expected = new Color(0x88DD22)
    309308        assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected
    310         assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour1") == expected
    311309    }
    312310
     
    317315        def expected = new Color(0x12, 0x34, 0x56, 0x78)
    318316        assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected
    319         assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour2") == expected
    320317    }
    321318
Note: See TracChangeset for help on using the changeset viewer.