ENH: Convert 26 more ITKCommon CTests to GoogleTest#5875
ENH: Convert 26 more ITKCommon CTests to GoogleTest#5875hjmjohnson wants to merge 40 commits intoInsightSoftwareConsortium:mainfrom
Conversation
Replace legacy CTest driver test with GoogleTest framework. Adds EXPECT_EQ assertions for ITK major, minor, and patch versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Adds EXPECT_EQ assertions verifying each vector element value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Adds assertions for event derivation, self-matching, unrelated event rejection, and event name verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Adds EXPECT_GT/EXPECT_GE assertions that modified time increases after calling Modified() and that bounding box time reflects point changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Splits into separate test cases per type (char, short, int, long, long long, float, double) and adds EXPECT_EQ/EXPECT_TRUE assertions after double-swap round-trips. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Splits into separate test cases for fixed-width, least, fast, and max/pointer integer types with EXPECT_TRUE assertions on size and signedness. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidate itkMathRoundTest, itkMathRoundTest2, and itkMathRoundProfileTest1 into a single GoogleTest file. The profiling test was purely diagnostic (no assertions) and its coverage is now subsumed by the typed round tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckGTest Replace legacy CTest driver test with GoogleTest framework. Splits into separate test cases per target type with EXPECT_TRUE assertions. Uses EXPECT_THROW to verify range overflow detection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Adds a TypeTraits test verifying static_assert conditions at runtime, and a ThreadSafeMonotonicity test with EXPECT_EQ/EXPECT_LE assertions verifying that multi-threaded Modified() calls assign unique, consecutive modified times. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Splits into separate test cases: EmptyBoxDefaults, OneDimensionalBox, ThreeDimensionalIsInside, ComputeCorners, and DeepCopy. Adds EXPECT_EQ, EXPECT_TRUE/FALSE, and EXPECT_NEAR assertions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Adds EXPECT_EQ assertions verifying the 15 neighborhood pixel values at the image boundary corner with ConstantBoundaryCondition(0), and verifies ZeroFluxNeumannBoundaryCondition traversal completes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Preserves the abort event diagnostic output. Adds EXPECT_TRUE assertions verifying that the ProcessAborted exception is thrown and that the abort event callback is called. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Preserves all diagnostic console output showing ownership transfer messages. Adds EXPECT_TRUE/FALSE assertions verifying IsOwner() state after TakeOwnership, copy construction, and Reset operations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace legacy CTest driver test with GoogleTest framework. Splits into two test cases: BuildLineFromVector and BuildLineFromIndices. Replaces manual error-checking with EXPECT_EQ assertions on line length and per-element index values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nGTest Replace itkHeavisideStepFunctionTest1, itkSinRegularizedHeavisideStepFunctionTest1, and itkAtanRegularizedHeavisideStepFunctionTest1 legacy CTest driver tests with GoogleTest framework. Combines into one file with three test cases: ExactHeaviside, SinRegularized, and AtanRegularized. Preserves diagnostic loop output over [-2, 2]. Replaces ITK_TRY_EXPECT_EXCEPTION with EXPECT_THROW and ITK_TEST_SET_GET_VALUE with EXPECT_EQ. Adds boundary assertions at x=0 and validates EvaluateDerivative matches pi/2 and 2/pi for Sin and Atan variants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
633ebce to
857b3c8
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
857b3c8 to
fd6d2d6
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fd6d2d6 to
03a58cd
Compare
| void | ||
| Execute(const DispatchBase &); | ||
| void Execute(Dispatch<2>); |
There was a problem hiding this comment.
Strange formatting hick-up! Is this from clang-format? Or is clang-format by-passed somehow?
|
Thanks Hans. But I'm sorry, I feel that pull requests with more than 2000 changes are very hard to review carefully 🤷 I would not want to trust AI blindly. |
@N-Dekker What would you prefer? I can make 26 different pull requests really easily, but that is going |
|
@hjmjohnson Thanks Hans. I think it would help if we could first just have conversions that can be compared line-by-line with the original Test.cxx files. I think those are the ones that are not "augmented". More specifically, I think those are the cases where an old Test.cxx is converted to a new GTest.cxx (not to an existing GTest.cxx) In those cases, Git moves the revision history from the old Test.cxx onto the new GTest.cxx. |
Summary
Continues the GTest conversion effort from #5874, converting 26 additional no-argument CTests in
Modules/Core/Common/test/to GoogleTest format.Each test is converted in a separate commit. Where a
*GTest.cxxalready existed, newTEST()blocks were appended. Where no GTest file existed, a new*GTest.cxxwas created. All diagnosticstd::coutoutput is preserved. Assertions (EXPECT_EQ,EXPECT_NEAR,EXPECT_TRUE, etc.) are added wherever the original test would have returnedEXIT_FAILURE.Tests converted (26)
Test plan
ctest -L ITKCommon)ctest -R <TestName>🤖 Generated with Claude Code