Changeset 10853 in josm for trunk/test/unit
- Timestamp:
- 2016-08-19T03:43:18+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.groovy
r10467 r10853 6 6 import org.openstreetmap.josm.JOSMFixture 7 7 import org.openstreetmap.josm.Main 8 import org.openstreetmap.josm.data.preferences.ColorProperty 8 9 9 10 class PreferencesTest extends GroovyTestCase { … … 18 19 19 20 void testColorAlpha() { 20 assert Main.pref.getColor("foo", new Color(0x12345678, true)).alpha == 0x1221 assert new ColorProperty("foo", new Color(0x12345678, true)).get().alpha == 0x12 21 22 assert Main.pref.putColor("bar", new Color(0x12345678, true)) 22 assert Main.pref.getColor("bar", null).alpha == 0x1223 assert new ColorProperty("bar", null).get().alpha == 0x12 23 24 } 24 25 25 26 void testColorNameAlpha() { 26 assert Main.pref.getColor("foo", "bar", new Color(0x12345678, true)).alpha == 0x1227 assert new ColorProperty("foo", "bar", new Color(0x12345678, true)).get().alpha == 0x12 27 28 assert Main.pref.getDefaultColor("foo") == new Color(0x34, 0x56, 0x78, 0x12) 28 29 assert Main.pref.getDefaultColor("foo").alpha == 0x12
Note:
See TracChangeset
for help on using the changeset viewer.