Skip to content

Add grid tests#762

Merged
samueltardieu merged 1 commit intomainfrom
push-qoyykuknvyzy
Mar 10, 2026
Merged

Add grid tests#762
samueltardieu merged 1 commit intomainfrom
push-qoyykuknvyzy

Conversation

@samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Mar 10, 2026

Summary by CodeRabbit

  • Tests
    • Expanded test coverage for grid iteration functionality to ensure iter() and into_iter() consistently yield accurate vertex results across sparse, dense, and full grid scenarios.

Co-authored-by: samueltardieu <44656+samueltardieu@users.noreply.github.com>
@samueltardieu samueltardieu enabled auto-merge March 10, 2026 11:32
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1a340a4a-0179-4abe-a5c3-45efd8273e42

📥 Commits

Reviewing files that changed from the base of the PR and between c424650 and ee2bfe1.

📒 Files selected for processing (1)
  • tests/grid.rs

📝 Walkthrough

Walkthrough

Three new test functions were added to validate that iter() and into_iter() methods on grids correctly yield all expected vertices regardless of iteration order, using sorted comparisons for order-agnostic verification.

Changes

Cohort / File(s) Summary
Grid iteration tests
tests/grid.rs
Added three test functions (iter_sparse_grid_yields_exact_vertices, iter_dense_grid_yields_exact_vertices, iter_full_grid_yields_all_vertices) validating that iteration methods return exact vertex sets via sorted comparison.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Three tests hopped into the warren,
To check that grids yield vertices so worn,
Sparse, dense, and full—all checked with care,
Iter and into_iter dance through the square,
Order may scatter, but vertices won't beware! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add grid tests' directly and accurately describes the main change: adding three new test cases to tests/grid.rs for grid iteration functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch push-qoyykuknvyzy

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@samueltardieu samueltardieu added this pull request to the merge queue Mar 10, 2026
@github-actions
Copy link

📊 iai-callgrind Benchmark Results

⚠️ 1 Regression(s) Detected

| Benchmark | Base | PR | Change | % |
|-----------|------|----|---------|
| iai_separate_components::bench_separate_components | 15,986,405 | 16,008,987 | +22,582 | +0.14% |

✅ 1 Improvement(s)

| Benchmark | Base | PR | Change | % |
|-----------|------|----|---------|
| iai_algos::corner_to_corner_idastar | 194,489 | 194,168 | -321 | -0.17% |

➡️ 18 Unchanged (within ±0.1%)

Click to expand
Benchmark Instructions
iai_algos::corner_to_corner_astar 150,136
iai_algos::corner_to_corner_bfs 2,947,648
iai_algos::corner_to_corner_bfs_bidirectional 3,881,580
iai_algos::corner_to_corner_dfs 3,592,021
iai_algos::corner_to_corner_dijkstra 3,734,617
iai_algos::corner_to_corner_fringe 216,764
iai_algos::corner_to_corner_iddfs 3,718,131
iai_algos::no_path_astar 3,348,856
iai_algos::no_path_bfs 2,756,526
iai_algos::no_path_bfs_bidirectional 3,383,731
iai_algos::no_path_dfs 3,629,686
iai_algos::no_path_dijkstra 3,691,818
iai_algos::no_path_fringe 4,417,030
iai_edmondskarp::wikipedia_example_dense 38,324
iai_edmondskarp::wikipedia_example_sparse 65,760
iai_kuhn_munkres::kuhn_munkres_size_128 4,965,503
iai_kuhn_munkres::kuhn_munkres_size_32 303,986
iai_kuhn_munkres::kuhn_munkres_size_64 1,434,909

iai-callgrind measures instructions executed, which is deterministic and not affected by system load.

Merged via the queue into main with commit f08f664 Mar 10, 2026
13 checks passed
@samueltardieu samueltardieu deleted the push-qoyykuknvyzy branch March 10, 2026 11:37
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