unitsofmeasurement / unit-tck

JSR 385 - Technology Compatibility Kit (TCK)
Other
6 stars 5 forks source link

Comparison of Quantity.getValue() should not depend on the number class #45

Closed desruisseaux closed 2 years ago

desruisseaux commented 2 years ago

Before this change, running the TCK on Seshat caused the following failure:

[FAILED]  5.6.1 Quantities obtained by string parsing(ObtainingQuantiesTest#testGetQuantitiesFromString):
java.lang.AssertionError: Section 5.6.1: Quantity value could not be parsed for '' expected:<1> but was:<1>

Note the "expected:<1> but was:<1>" part of the message. It was caused by TCK expecting 1 as a java.lang.Integer while Seshat provides 1 as a java.lang.Double. This commit compares the double value, which makes the test independent of the actual number class.


This change is Reviewable