-
Notifications
You must be signed in to change notification settings - Fork 216
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
[test] add cases for issues #1229 #1231 #1244 and some test refactoring #1256
[test] add cases for issues #1229 #1231 #1244 and some test refactoring #1256
Conversation
…and some test refactoring
|
||
// Change compiler defines to constexpr bools | ||
// to make conditions more readable | ||
// and to always compile all code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in difference.cpp
only, until now.
If you agree, I'll apply it in the others too. And we can apply it everywhere.
Advantages:
if
i/oifdef
- code is always compiled
- easier to read
Also, we can harmonize it with the removing of the rescaling, as done in this source file.
@@ -41,10 +68,12 @@ | |||
( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \ | |||
clips3, -1, area1 + area2, settings) | |||
|
|||
template <typename P> | |||
template <typename P, bool ClockWise> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added ccw
tests for difference, it was not earlier there. Most cases work, but a few of them don't - they are now conditionally
example_star, clip, | ||
4, 16, 0.833333, 4, 20, 2.833333); | ||
using box = bg::model::box<P>; | ||
using ring = bg::model::ring<P>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in the block below are mainly whitespace
TEST_DIFFERENCE(issue_1231, 1, 203161.751, 2, 1237551.0171, 1); | ||
} | ||
|
||
if BOOST_GEOMETRY_CONSTEXPR(! is_ccw || test_failures) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awulkiew I assume this is fine, and an else branch is not needed in such cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this will help tracking the bugs in setops.
No description provided.