Repository navigation
BUG: Fail four tests that swallow unexpected exceptions, then convert to GoogleTest - #7051
Merged
hjmjohnson merged 8 commits intoNov 3, 2026
Conversation
3 of 11 tasks
hjmjohnson
marked this pull request as ready for review
October 31, 2026 18:22
Contributor
[Low impact] The PR appears safe to merge; no actionable issues were found.
|
hjmjohnson
force-pushed
the
bug-swallowed-exceptions-misc
branch
from
October 31, 2026 23:23
d9de8e1 to
0d62971
Compare
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
Nov 1, 2026
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
Nov 1, 2026
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
Nov 2, 2026
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
Nov 2, 2026
dzenanz
reviewed
Nov 2, 2026
The catch block printed the exception and let the test continue, so a failure went unnoticed and the test still passed.
The catch block printed the exception and let the test continue, so a failure went unnoticed and the test still passed.
…tion The catch block printed the exception and let the test continue, so a failure went unnoticed and the test still passed.
The catch block printed the exception and let the test continue, so a failure went unnoticed and the test still passed.
hjmjohnson
force-pushed
the
bug-swallowed-exceptions-misc
branch
from
November 2, 2026 19:24
0d62971 to
11a8b47
Compare
hjmjohnson
force-pushed
the
bug-swallowed-exceptions-misc
branch
from
November 2, 2026 19:27
11a8b47 to
d2342d3
Compare
Member
Author
|
@greptileai review this draft before I make it official |
dzenanz
approved these changes
Nov 2, 2026
hjmjohnson
merged commit Nov 3, 2026
d308fce
into
InsightSoftwareConsortium:main
19 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.
Four tests caught an unexpected exception, printed it, and carried on, so a failing filter or setter went unnoticed and the test still passed. For each test, one
BUG:commit makes the catch fail the test, and the next commit converts the fixed test to GoogleTest (ASSERT_NO_THROW, orEXPECT_NO_THROWfor a final statement).itkMaskImageFilterTestvectorFilter->Update()with the default outside valueitkMultivariateLegendrePolynomialTestSetCoefficients(), behind an emptycatch (...)itkImplicitManifoldNormalVectorFilterTestfilter->Update(), the test's only real checkitkLaplacianSegmentationLevelSetImageFilterTestUpdate()calls (first run and reinitialized rerun)Testing
macOS arm64, conda clang, Release,
ITK_BUILD_DEFAULT_MODULES=OFFwithModule_ITKImageIntensity,Module_ITKPolynomials, andModule_ITKLevelSetson. Every one of the 8 commits builds the affected drivers with 0 warnings and passes the four tests; each fixed legacy test passes, so none of these calls throws today.pre-commit run --all-filespasses.itkMultivariateLegendrePolynomialTestis the only Polynomials test, so its conversion replaces the module's legacy driver with a GoogleTest driver and addsITKGoogleTesttoTEST_DEPENDS.How these were found
Same review as #7048 (Statistics) and #7049, extended to the rest of the tree. The staged conversions on
gtest-staging-Bandgtest-staging-Ccopied these catch blocks faithfully.AI assistance (Claude Code) was used to find the defects and draft the changes; they were reviewed and tested locally.