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: Change unit tests floating point type to double and add a precision argument to output streams #558

Merged
merged 5 commits into from Jan 29, 2024

Conversation

boxanm
Copy link
Collaborator

@boxanm boxanm commented Jan 23, 2024

Description

The order of floating-point operations led to different results between these debug and release builds on ARM64.
This was probably due to different optimizations done by the compiler.
I changed the floating-point precision of all tests to double, which solved the failed transformation tests.
As a side task, I also had to add a precision argument to all Point cloud save functions to keep IO utests from failing.

Summary:

Fixes #556

Changes and type of changes (quick overview):

  • Change the floating-point precision of all tests to double
  • Add a precision argument to all Point cloud save functions

Checklist:

Code related

  • I have made corresponding changes to the documentation
    (i.e.: function, class, script header, README.md)
  • I have commented hard-to-understand code
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
    (Check README.md #Contributing
    for local testing procedure using libpointmatcher-build-system)

PR creation related

  • My pull request base ref branch is set to the develop branch
    (the build-system won't be triggered otherwise)
  • My pull request branch is up-to-date with the develop branch
    (the build-system will reject it otherwise)

PR description related

  • I have included a quick summary of the changes
  • [ x I have indicated the related issue's id with # <issue-id> if changes are of type fix
  • I have included a high-level list of changes and their corresponding type
    • Types: feat fix docs style refactor perf test build ci chore revert
    • Breaking changes: <type>!
    • Reference:
      see commit_msg_reference.md
      in the repository root for details

Copy link
Collaborator

@simonpierredeschenes simonpierredeschenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Copy link

sonarcloud bot commented Jan 25, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
2.5% Duplication on New Code

See analysis details on SonarCloud

@boxanm boxanm merged commit 1652178 into develop Jan 29, 2024
6 checks passed
@boxanm boxanm deleted the issue_556-failed_transformation_unit_tests branch January 29, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants