Closed andi-huber closed 5 years ago
I've removed the powerLookupMap
introduced with the previous merge, because it (granted) solves a particular test-case [1], but will fail once we slightly change this testcase [2]:
assertEquals(MICRO(GRAM), GRAM.divide(1_000_000)); // [1]
assertEquals(MICRO(GRAM).multiply(2), GRAM.divide(500_000)); // [2]
Converter Equality must instead be checked via ...
ComparableUnit a = (ComparableUnit) MICRO(GRAM);
ComparableUnit b = (ComparableUnit) GRAM.divide(1_000_000);
assertEquals(true, a.isEquivalentTo(b));
assertEquals(true, b.isEquivalentTo(a));
This change is