feat: updated command line parser and tests - #2
Conversation
📝 WalkthroughWalkthroughThe command-line parser now stores option values under canonical names and resolves registered aliases for ChangesCanonical Command-Line Option Lookup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/command_line_parser_test.cpp (1)
434-436: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest
valueswith the registered alias.
values("-w")is part of the public alias contract, but this test only queries"--window". Add an alias assertion to detect regressions in alias normalization forvalues.Proposed test addition
auto window_vals = parser.values("--window"); EXPECT_EQ(window_vals.size(), 1); EXPECT_EQ(window_vals[0], "1920x1080"); + auto window_alias_vals = parser.values("-w"); + EXPECT_EQ(window_alias_vals.size(), 1); + EXPECT_EQ(window_alias_vals[0], "1920x1080");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/command_line_parser_test.cpp` around lines 434 - 436, Extend the test around parser.values("--window") to also query the registered "-w" alias and assert it returns the same single "1920x1080" value, verifying alias normalization for values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/command_line_parser_test.cpp`:
- Around line 434-436: Extend the test around parser.values("--window") to also
query the registered "-w" alias and assert it returns the same single
"1920x1080" value, verifying alias normalization for values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c4c5a7a5-719d-4a2b-937b-787035cec831
📒 Files selected for processing (3)
include/vertexnova/utils/command_line_parser.hsrc/command_line_parser.cpptests/command_line_parser_test.cpp
Summary by CodeRabbit
-w=valuesyntax.