use of javax.measure.format.UnitFormat in project uom-se by unitsofmeasurement.
the class LocalFormatTest method testParseIrregularStringLocal.
@Test(expected = UnsupportedOperationException.class)
public void testParseIrregularStringLocal() {
final UnitFormat format = LocalUnitFormat.getInstance();
Unit<?> u = format.parse("bl//^--1a");
// System.out.println(u);
}
use of javax.measure.format.UnitFormat in project uom-se by unitsofmeasurement.
the class LocalFormatTest method testPrefixKm.
@Test
@Ignore
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());
}
Aggregations