test(core,imgproc): add 28 critical unit tests for untested public APIs#25
Merged
test(core,imgproc): add 28 critical unit tests for untested public APIs#25
Conversation
…Is (#23) Add comprehensive test coverage for high-impact functions that previously had zero tests: scalar arithmetic variants, bitwise scalar ops, min/max, comparison ops, in_range, reduction, polar/cartesian conversions, linear algebra (determinant, invert, solve), channel ops (extract/insert), DynamicMatrix, gray-to-color conversions, and kernel helpers. Update README with test coverage summary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
core/tests.rs, 7 inimgproc/tests.rs) covering ~40 previously untested public API functionscompare,in_range), reduction (reduce,count_non_zero), polar/cartesian conversions, linear algebra (determinant,invert,solve), channel ops (extract_channel,insert_channel),DynamicMatrix, gray-to-color conversions, and kernel helpersCloses #23
New tests
src/core/tests.rs(21 tests)test_scalar_arithmetic,test_abs_diff_scalar,test_bitwise_scalartest_min_max,test_min_max_scalartest_compare,test_compare_scalar,test_in_range,test_in_range_scalartest_reduce_sum_avg,test_reduce_min_max,test_count_non_zerotest_magnitude,test_phase,test_cart_to_polar,test_polar_to_carttest_determinant,test_invert,test_solvetest_extract_insert_channeltest_dynamic_matrixsrc/imgproc/tests.rs(7 tests)test_cvt_color_gray_to_rgb,test_cvt_color_gray_to_bgr,test_cvt_color_gray_to_rgba,test_cvt_color_gray_to_bgra,test_gray_to_color_errortest_get_gaussian_kernel,test_get_sobel_kernelsTest plan
cargo test --workspace— 153 tests passcargo clippy -- -D warnings— cleancargo fmt --check— clean🤖 Generated with Claude Code