Repository navigation
BUG: Name the real superclass in ITK_EXERCISE_BASIC_OBJECT_METHODS calls - #59
Closed
hjmjohnson wants to merge 1 commit into
Closed
hjmjohnson wants to merge 1 commit into
hjmjohnson wants to merge 1 commit into
Conversation
ITK_EXERCISE_BASIC_OBJECT_METHODS compares Superclass::GetNameOfClass() with the stringified third argument and fails the test on a mismatch. Nine calls named a class that is not the object's direct superclass: - MaximumFeatureAggregator derives from FeatureAggregator, not UnaryFunctorImageFilter (itkDescoteauxSheetnessFeatureGeneratorMultiScaleTest1). - LesionSegmentationMethod derives from ProcessObject, not LightObject (itkLesionSegmentationMethodTest10). - SatoVesselnessSigmoidFeatureGenerator derives from SatoVesselnessFeatureGenerator, not FeatureGenerator (itkSatoVesselnessSigmoidFeatureGeneratorMultiScaleTest1, four calls; itkFeatureAggregatorTest1, one call). - LungWallFeatureGenerator and SigmoidFeatureGenerator derive from FeatureGenerator, not FeatureAggregator (itkFeatureAggregatorTest1). The first three tests fail identically against ITK main and ITK release-5.4 in the downstream build matrix. itkFeatureAggregatorTest1 is only built when TEST_CORNELL_DATA_ROOT is set, so its three mismatches were latent.
hjmjohnson
marked this pull request as ready for review
October 7, 2026 18:07
Member
Author
|
Superceeded. |
Member
Author
|
Superseded by #61, which carries this change as |
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.
Three module tests fail identically against ITK
mainandrelease-5.4because theirITK_EXERCISE_BASIC_OBJECT_METHODScalls name a superclass that is not the object's direct superclass; the macro comparesSuperclass::GetNameOfClass()with the third argument. This corrects the nine such calls (the three failing tests plus three latent mismatches initkFeatureAggregatorTest1, which only builds withTEST_CORNELL_DATA_ROOT).Each correction
Found by comparing every macro call's third argument against the
: publicbase in the matching header; every other call intest/already matches.Test plan
Each corrected name was checked against the
: publicbase in the class header. The four test sources compile against ITKmain(clang, Release, macOS arm64). The tests themselves could not be run here:itkDescoteauxSheetnessFeatureGeneratorMultiScaleTest1anditkSatoVesselnessSigmoidFeatureGeneratorMultiScaleTest1are registered only underif(TEST_CORNELL_DATA_ROOT),itkLesionSegmentationMethodTest10is compiled but never registered, and on GCC and clangITK_EXERCISE_BASIC_OBJECT_METHODSprints the names without comparing them (itkTestingMacros.h,#if defined(__GNUC__)). The comparison runs on MSVC.