Search in sources :

Example 1 with LocalUnitFormat

use of tech.units.indriya.format.LocalUnitFormat in project indriya by unitsofmeasurement.

the class LocalFormatTest method testPrefixKm.

@Test
@Disabled
public // TODO LocalUnitFormat won't parse Compound Units, EBNF does, also see https://github.com/unitsofmeasurement/uom-se/issues/145
void testPrefixKm() {
    final UnitFormat format = LocalUnitFormat.getInstance();
    Unit<?> u = format.parse("km");
    assertEquals(KILO(METRE), u);
    assertEquals("km", u.toString());
}
Also used : UnitFormat(javax.measure.format.UnitFormat) LocalUnitFormat(tech.units.indriya.format.LocalUnitFormat) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Aggregations

UnitFormat (javax.measure.format.UnitFormat)1 Disabled (org.junit.jupiter.api.Disabled)1 Test (org.junit.jupiter.api.Test)1 LocalUnitFormat (tech.units.indriya.format.LocalUnitFormat)1