test(imgproc): move histogram module tests into src/imgproc/tests.rs - #119
Merged
Conversation
Every other imgproc submodule (color.rs, edge.rs, filter.rs, morph.rs, pyramid.rs, threshold.rs, hough.rs, geometric.rs, resize.rs, derivatives.rs, feature.rs) keeps its tests solely in the shared src/imgproc/tests.rs, per the module structure convention in CLAUDE.md. histogram.rs was the only one with its own embedded #[cfg(test)] mod tests block, left over from how #99 originally wrote it. Mechanical move, no behavior change: all 33 histogram tests already went through the public API (calc_hist, calc_back_project, compare_hist, equalize_hist, Clahe/create_clahe, RangeSpec, HistCompMethods) with no dependency on private helpers, so they drop straight into tests.rs's existing imgproc_tests module (which already glob-imports crate::core::* and crate::imgproc::*) with no import changes needed. Verified: same 342 lib test count before and after (nothing lost or duplicated), passing under both default and --no-default-features --features std, fmt/clippy clean under --all-features and --no-default-features. Closes #111 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR Summary by QodoRelocate histogram tests into the shared imgproc test module
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #111.
Every other
imgprocsubmodule keeps its tests solely in the sharedsrc/imgproc/tests.rs, per the module structure convention inCLAUDE.md.histogram.rswas the only one with its own embedded#[cfg(test)] mod testsblock, left over from how #99 originally wrote it.Mechanical move, no behavior change — all 33 histogram tests already went
through the public API with no dependency on private helpers, so they drop
straight into
tests.rs's existingimgproc_testsmodule (which alreadyglob-imports
crate::core::*andcrate::imgproc::*) with no importchanges needed.
Test plan
cargo test --workspaceandcargo test --workspace --no-default-features --features stdboth pass.cargo fmt --check/clippy -D warningsclean under--all-featuresand
--no-default-features.🤖 Generated with Claude Code