-
Notifications
You must be signed in to change notification settings - Fork 53
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
comparison differentiates absent and empty components #645
comparison differentiates absent and empty components #645
Conversation
GCOVR code coverage report https://645.url.prtest.cppalliance.org/gcovr/index.html |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #645 +/- ##
===========================================
- Coverage 96.48% 96.39% -0.10%
===========================================
Files 138 138
Lines 6746 6789 +43
===========================================
+ Hits 6509 6544 +35
- Misses 237 245 +8
Continue to review full report at Codecov.
|
Seems mostly ok except for style nits but what is the motivation for this? |
Great. I'll fix that.
The main motivation is fixing the bug. The previous function would compare an absent component and an empty component as the same thing, but that's wrong. BOOST_TEST_EQ(url("https:"), url("https://"));
BOOST_TEST_EQ(url("https://@www.boost.org"), url("https://www.boost.org"));
BOOST_TEST_EQ(url("https:"), url("https:?"));
BOOST_TEST_EQ(url("https:"), url("https:#"));
// ... etc should fail. I'll improve coverage with a few more tests and the difference is going to be more explicit. |
"simplify URL comparison" doesnt' really tell me that there's a bug in the current release of Boost.URL |
Yes. I chose that because it's not the only thing happening in the PR and because of the trend of "refactor xx" being a synonym for "fix xx". |
f096d42
to
b6d2945
Compare
b6d2945
to
3d783b6
Compare
GCOVR code coverage report https://645.url.prtest.cppalliance.org/gcovr/index.html |
This PR simplifies the URL comparison function. It also fixes a bug where the difference between some absent and empty components was not considered. This fix was part of #425, which is now obsoleted.