Skip to content

Add regression-guard tests for validation steps, CMake parser, and ro…#23

Merged
Joschi3 merged 2 commits into
mainfrom
tests/add-regression-guards-around-step-and-parser-branches
May 13, 2026
Merged

Add regression-guard tests for validation steps, CMake parser, and ro…#23
Joschi3 merged 2 commits into
mainfrom
tests/add-regression-guards-around-step-and-parser-branches

Conversation

@Joschi3
Copy link
Copy Markdown
Owner

@Joschi3 Joschi3 commented May 12, 2026

Why

PRs #21 and #22 added significant new code without matching unit tests.
Several logical branches had no test pinning their behaviour — they worked,
but nothing would catch a future refactor that quietly inverts a condition,
drops a warning, or reorders a sort. This PR closes those gaps. The goal is
regression protection, not coverage-number theatre.

What's tested now that wasn't before

Validation step branches

  • CMakeComparisonStep: missing CMakeLists.txt, strict-vs-non-strict
    unresolved-dep reporting, evaluate_conditions=False formatter fallback.
  • RosdepCheckStep: all three early-return paths.
  • BuildTypeExportStep: check-only missing/wrong type, no-auto-fill
    critical error, auto-fill success path.
  • PackageXmlValidator: compare_with_cmake && !check_rosdeps guard,
    malformed-XML continuation.

Parsing & resolution logic

  • cmake_parsers: find_package(... QUIET) without REQUIRED is skipped;
    resolve_for_each correctly expands foreach(... IN LISTS ...) blocks.
  • rosdep_validator.search_rosdep_candidates: the 4-tier sort order,
    length tiebreaks, and the 5-result cap.

Filesystem / workspace edge cases

  • TOML files outside a launch/ directory are skipped during launch-dep
    discovery.
  • workspace.get_pkgs_in_wrs pkg_dir is None fallback.
  • verify_rosdep_mapping: YAML load failure and per-key ResolutionError
    paths.
  • resolve_indentation empty-root / tail=None / no-newline fallbacks.

162 → 194 tests, all passing. No production code changes.

@Joschi3 Joschi3 self-assigned this May 12, 2026
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link
Copy Markdown

@Joschi3 Joschi3 merged commit 743389f into main May 13, 2026
3 checks passed
@Joschi3 Joschi3 deleted the tests/add-regression-guards-around-step-and-parser-branches branch May 13, 2026 07:45
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.

2 participants