Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix structural comparison for org.iets3.core.expr.typetags.units #955

Open
psuzzi opened this issue May 17, 2024 · 0 comments
Open

Fix structural comparison for org.iets3.core.expr.typetags.units #955

psuzzi opened this issue May 17, 2024 · 0 comments
Assignees
Labels
PRIO Use for issues/PRs with customer project background

Comments

@psuzzi
Copy link
Collaborator

psuzzi commented May 17, 2024

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.

@psuzzi psuzzi added the PRIO Use for issues/PRs with customer project background label May 17, 2024
@psuzzi psuzzi self-assigned this May 17, 2024
psuzzi added a commit that referenced this issue May 17, 2024
psuzzi added a commit that referenced this issue May 17, 2024
psuzzi added a commit that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRIO Use for issues/PRs with customer project background
Projects
None yet
Development

No branches or pull requests

1 participant