Repository navigation
BUG: Fail CovarianceSampleFilter3 test when Update() throws - #7049
Merged
hjmjohnson merged 1 commit intoOct 31, 2026
Merged
hjmjohnson merged 1 commit into
hjmjohnson merged 1 commit into
Conversation
The catch block printed the exception and let the test continue, so a failing Update() went unnoticed and the checks that follow ran on output that was never produced.
This was referenced Oct 31, 2026
dzenanz
approved these changes
Oct 31, 2026
hjmjohnson
marked this pull request as ready for review
October 31, 2026 17:12
Contributor
[Low impact] This change appears safe to merge.
|
hjmjohnson
merged commit Oct 31, 2026
ffda1aa
into
InsightSoftwareConsortium:main
18 of 20 checks passed
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.
itkCovarianceSampleFilterTest3caught an exception fromUpdate(), printed it, and carried on, so a failing filter went unnoticed and the checks that followed read output that was never produced. The catch now fails the test.This is the same defect fixed in ten other Statistics tests by #7048. It is a separate PR because #7046 converts this test to GoogleTest. If this merges first, the conversion in #7046 gets
ASSERT_NO_THROW(filter->Update())when it is rebased; if #7046 merges first, this PR is rebased to make that change in the GoogleTest instead.Testing
macOS arm64, conda clang, Release,
Module_ITKStatistics=ON. Builds with 0 warnings;itkCovarianceSampleFilterTest3passes, which confirms that thisUpdate()does not throw today.pre-commit run --all-filespasses.AI assistance (Claude Code) was used to find the defect and draft the change; it was reviewed and tested locally.