Skip to content

add test for enumeration conversion - #1332

Open
phlptp wants to merge 5 commits into
CLIUtils:mainfrom
phlptp:enum_conversion
Open

add test for enumeration conversion#1332
phlptp wants to merge 5 commits into
CLIUtils:mainfrom
phlptp:enum_conversion

Conversation

@phlptp

@phlptp phlptp commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

Looking into #1330,

adding a test for the described issue.

@codecov

codecov Bot commented Apr 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fafea49) to head (e652202).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1332   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines         5225      5225           
  Branches      1131      1131           
=========================================
  Hits          5225      5225           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@oscarpeer-design

Copy link
Copy Markdown
Contributor

Your tests are failing because variables are uninitialised:
/__w/CLI11/CLI11/tests/NewParseTest.cpp:687:11: error: variable 'color' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 687 | Color color; | ^ /__w/CLI11/CLI11/tests/NewParseTest.cpp:688:11: error: variable 'other_color' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 688 | Color other_color; |

@henryiii

henryiii commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

That's allowed, but yes, it's tripping up an optional rule.

phlptp and others added 5 commits July 29, 2026 17:59
Initialize the test variables (cppcoreguidelines-init-variables) and use
std::map for the enum-keyed map, since GCC before 6.1 has no std::hash
for enums.

Assisted-by: ClaudeCode:claude-fable-5
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.

3 participants