Changeset 16110 in josm for trunk/test/unit
- Timestamp:
- 2020-03-10T23:08:20+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/FunctionsTest.java
r15246 r16110 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertTrue; 5 6 import static org.openstreetmap.josm.data.osm.OsmPrimitiveType.NODE; 6 7 … … 89 90 assertEquals(0, Functions.osm_timestamp(new EnvBuilder(NODE).build())); 90 91 } 92 93 /** 94 * Unit test of {@code Functions#to_xxx} 95 */ 96 @Test 97 public void testParseFunctions() { 98 assertTrue(Functions.to_boolean("true")); 99 assertEquals(1, Functions.to_byte("1")); 100 assertEquals(1, Functions.to_short("1")); 101 assertEquals(1, Functions.to_int("1")); 102 assertEquals(1L, Functions.to_long("1")); 103 assertEquals(1f, Functions.to_float("1"), 1e-10); 104 assertEquals(1d, Functions.to_double("1"), 1e-10); 105 } 91 106 }
Note:
See TracChangeset
for help on using the changeset viewer.