iets3.opensource
iets3.opensource copied to clipboard
Fix structural comparison for org.iets3.core.expr.typetags.units
The old units in org.iets3.core.expr.typetags.units have an issue in structural comparison, e.g. in EditorTests.
In structural tests, e.g. as a result of an Editor Tests, a unit s^-1*m is considered different w.r.t. m*s^-1, despite the typesystem considers them the same.
A possible solution is to edit the behavior of org.iets3.core.expr.typetags.units, and check for unordered hashsets or hashmaps, and replace them with linked_hashset and linked_hashmaps.
Most likely, the problem is un UnitConversionUtil, but it is worth searching for all occurrences of HashSetCreator and HashMapCreator in the old units, and see in the behavior.
The change should be accompanied by tests.