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

Fixes compile error in tests and add removed tests for is_simple and is_valid #1251

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

vissarion
Copy link
Member

Following comment #1237 (comment) this PR adds removed tests for is_simple and is_valid with geometries whose coordinates are close to the maximum double.
The tests are passing with the fix of #1237 but the results are different i.e. the intersection does not create NaN coordinates, it is more accurate but still can create invalid geometries.

This PR also fixes a compile error in tests (wrong namespace for numeric_cast).

@vissarion vissarion changed the title Add removed tests for is_simple and is_valid Fixes compile error in tests and add removed tests for is_simple and is_valid Feb 28, 2024
BOOST_CHECK_CLOSE(bg::detail::numeric_cast<double>(r2), 2.5, 0.00001);
BOOST_CHECK_EQUAL(bg::detail::numeric_cast<int>(r2), 2);
BOOST_CHECK_CLOSE(bg::util::numeric_cast<double>(r2), 2.5, 0.00001);
BOOST_CHECK_EQUAL(bg::util::numeric_cast<int>(r2), 2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oops. As soon as the Cmake PR is merged ,this won't happen anymore ;-)
Thanks for fixing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see it was just approved, thanks, it's merged now

Copy link
Collaborator

@barendgehrels barendgehrels left a comment

Choose a reason for hiding this comment

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

looks good to me

@vissarion vissarion merged commit a58b5a5 into boostorg:develop Feb 28, 2024
23 checks passed
@vissarion vissarion deleted the fix/test_nan branch February 28, 2024 11:31
@vissarion vissarion added this to the 1.85 milestone Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants