Skip to content

Improve FORM test coverage#340

Merged
greenc-FNAL merged 2 commits intomainfrom
maintenance/improve-FORM-test-coverage
Feb 19, 2026
Merged

Improve FORM test coverage#340
greenc-FNAL merged 2 commits intomainfrom
maintenance/improve-FORM-test-coverage

Conversation

@greenc-FNAL
Copy link
Contributor

@greenc-FNAL greenc-FNAL requested review from Copilot and knoepfel and removed request for Copilot February 18, 2026 21:46
greenc-FNAL and others added 2 commits February 18, 2026 15:48
- 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>
@greenc-FNAL greenc-FNAL force-pushed the maintenance/improve-FORM-test-coverage branch from 648cd53 to 19b1031 Compare February 18, 2026 21:48
@greenc-FNAL greenc-FNAL requested review from aolivier23, gemmeren, pcanal and wwuoneway and removed request for knoepfel February 18, 2026 21:49
@codecov
Copy link

codecov bot commented Feb 18, 2026

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     
Flag Coverage Δ
unittests 81.39% <ø> (+0.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/util/factories.hpp 45.00% <ø> (ø)

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e71e70e...19b1031. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@aolivier23 aolivier23 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, thanks. I don't yet understand what the inline does.

@wwuoneway
Copy link
Contributor

inline here can help achieves linkage/safe w.r.t. One Definition Rule (ODR).
Looks good to me.

@knoepfel
Copy link
Member

Looks good, thanks. I don't yet understand what the inline does.

@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 inline, and that's an indication to the compiler that the function definition should be treated as an inline definition that would be expanded at the function's call sites.

@greenc-FNAL greenc-FNAL merged commit 1c65f7e into main Feb 19, 2026
59 checks passed
@knoepfel knoepfel deleted the maintenance/improve-FORM-test-coverage branch February 24, 2026 20:58
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.

5 participants