Conversation
greenc-FNAL
commented
Feb 18, 2026
- Improve test coverage of FORM code
- Address Improve test coverage of FORM code #333 (review)
- Added new unit tests for 'form' - Added `test/form_basics_test.cpp` to cover previously untested code in form libraries. - Fixed possible ODR violations in `form/util/factories.hpp` by adding `inline`. Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
648cd53 to
19b1031
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #340 +/- ##
==========================================
+ Coverage 80.39% 81.39% +0.99%
==========================================
Files 127 127
Lines 3102 3102
Branches 547 547
==========================================
+ Hits 2494 2525 +31
+ Misses 381 359 -22
+ Partials 227 218 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
aolivier23
left a comment
There was a problem hiding this comment.
Looks good, thanks. I don't yet understand what the inline does.
|
inline here can help achieves linkage/safe w.r.t. One Definition Rule (ODR). |
@aolivier23, a free function should not be defined in a header file as it will create multiple definitions in separate translation units that, when linked together, will result in multiple definitions in the same library. To avoid this problem, the free function should be declared in the header file only. Or, the function definition can be marked |