-
Notifications
You must be signed in to change notification settings - Fork 229
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
Linear BIG_CONST macros and try lcov-excl #1086
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1086 +/- ##
===========================================
+ Coverage 88.61% 89.82% +1.21%
===========================================
Files 768 768
Lines 64669 63722 -947
===========================================
- Hits 57306 57241 -65
+ Misses 7363 6481 -882
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Hi @jzmaddock and @mborland and @NAThompson this work might seem ugly/controversial/hurried. But I looked into simplifying the big-constant macros such that they can be neatly expressed as single-line macros. This allows for simple line-by-line Anyway, it is a method, but might be controversial. Comments? Thoughts? |
I've tried (but not yet succeeded) to directly put the code annotation into the macros themselves. |
One thing I did notice is that when the couple hundred annotations are in place, it really draws focus to the several hundred remaining specfun missed lines that are actually much more, let's say, interesting and content-rich. So feedback would be appreciated, ... Cc: @jzmaddock and @mborland and @NAThompson |
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.
Looks good to me. 200+ lines removed does help.
Thanks Matt. It ended up being closer to 1,000 lines. I could not find any other large, missed tables in specfun. But some were, in fact, covered. I annotated the ones I found must have been covered but were seemingly mistakenly marked by |
The one test file doesn't have real testing in it: https://github.com/boostorg/math/blob/develop/test/octonion_test.cpp. |
I suppose we might as well just exclude it from the |
On second thought, that is too hasty. This is our one-time chance to actually get some octernion testing. Or notice that they fail. I think we should try for tests. I can give this one a crack in another branch later, ... |
Forgive me, late night last night... but BOOST_MATH_BIG_CONSTANT is now being called with 2 arguments, but still defined with 3? I know I'm missing something... ! BTW the basic issue is that multi-line statements are badly handled by lcov, so there are quite a few function calls that look like:
especially when the arguments are long error messages... and these are marked as uncovered except for the last line. The issue with the arrays are the same, it's not the macros as such that cause the issue, just that we have dynamic initialization spread over several lines. For the functions I've been collapsing down to one line where possible, and using LCOV_EXCL_LINE when not. For the arrays, I've topped and tailed the list of initializers with LCOV_EXCL_START/LCOV_EXCL_STOP. BTW I have just started on coverage for beta, hoping to get to erf or so in the next tranche, I am going to be super busy this week though unfortunately :( |
Hi John, thanks for those explanations.
Not exaclty, but there are such changes in this PR. That's me, messing with stuff. I left the number of parameters of The other mega-macro,
I can do that and eliminate the thousand or so single-line annotations in this PR. I did, however, diligently look if I felt that they were covered prior to x-ing them out. So I'm good with that. Also, I kind of like the way I refactored |
oops. I did mess up some of the calls to |
I'll finish this up (whatever I started) but just let it sit there, as it seems like it was a bit hurried. @jzmaddock if you want some, none, or all of it, pls let me know. It was/is a good exercise. |
I do, in fact, like the single-line expression(s) of The three-parameters of Anyway, I'll let this one bake for a while. |
I converted this PR to a draft. I'm not going to really dive into this any time soon, but I synchronized with Develop and it now shows some of the tabble/macro work that subjectively seemed to make sense to me. |
The purpose of this PR is to streamline/linearize macros sich as
BOOST_MATH_BIG_CONSTANT
and subsequently check if line-by-line lcov-exclude makes sense.