ENH: Convert four no-arg Common tests to GoogleTest#6132
Conversation
c1f2cf8 to
39d47a7
Compare
hjmjohnson
left a comment
There was a problem hiding this comment.
The next batch of gtest conversions.
39d47a7 to
9651bcb
Compare
This comment was marked as resolved.
This comment was marked as resolved.
9651bcb to
52dd1cb
Compare
|
/azp run ITK.Windows |
52dd1cb to
a5e6834
Compare
|
Fixed Windows MSVC compile error in a5e6834 (squashed via
Verified locally: /azp run ITK.Windows |
a5e6834 to
2531f84
Compare
2531f84 to
460fc8d
Compare
|
I think there is exercise_basic_object_gtest (or similarly named) macro. |
Yes. and I noted it for future conversions, so hopefully this does not show up again. ITK_GTEST_EXERCISE_BASIC_OBJECT_METHODS(calculator, MinimumMaximumImageCalculator, Object); |
460fc8d to
1389184
Compare
…vert-common-gtests-2026-04-25 ENH: Convert four no-arg Common tests to GoogleTest
Mechanical CTest → GoogleTest conversion of four no-argument tests in
Modules/Core/Common/test/. All four pass locally againstITKCommonGTestDriver.Commit summary
itkImageAdaptorPipeLineTest→itkImageAdaptorPipeLineGTestitkExtractImage3Dto2DTest→itkExtractImage3Dto2DGTestitkExtractImageTest→itkExtractImageGTestgit log --follow)itkMinimumMaximumImageCalculatorTest→itkMinimumMaximumImageCalculatorGTestMechanical-conversion details
int itkFooTest(int, char *[])→TEST(Foo, ConvertedLegacyTest).if (...) return EXIT_FAILURE;→EXPECT_*(orFAIL() << "msg"when the original printed a terminal error message).ITK_TEST_SET_GET_VALUE→EXPECT_EQ(the macro's expansion includesreturn EXIT_FAILURE, incompatible withTEST()void bodies).ITK_TEST_EXPECT_TRUE→EXPECT_TRUE(same reason).return ExtractImageInPlaceTest()→ call as void; helper signature changed frombooltovoid(it only containedEXPECT_TRUEchecks).std::coutdiagnostic prints kept.*GTest.cxxfiles added toITKCommonGTestsset (alphabetical position); legacy entries removed fromITKCommon{1,2}Testsand the correspondingitk_add_test(...)blocks deleted.Local verification
Filter:
--gtest_filter='ImageAdaptorPipeLine.*:ExtractImage*.*:MinimumMaximumImageCalculator.*'