Repository navigation
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
dzenanz
left a comment
There was a problem hiding this comment.
Looks good on a quick glance. It would be good if someone reviewed this more carefully.
|
@dzenanz Any suggestions for active developers who could review? I'm happy to continue the conversion to gtests, but it feels like the enthusiasm for these conversions has dropped off. There are about 600 more no-argument tests that could be converted (mostly mechanical at this point). I find it's a lot easier to debug the gtest than the other tests, and I find that they are much less verbose, but perhaps the pain of bulk conversions is too much of a burden given the ever-shrinking ITK developer community. |
Perhaps do these conversion as you "touch" tests for other reasons. Changes require effort, and the value of these test conversions is on the low side. |
Convert five no-argument CTests in
Modules/Core/Common/testto GoogleTest, one mechanical conversion per commit, plus a follow-up commit that adds result assertions to the previously assertion-freeitkNumericsTest.Each conversion preserves history via
git mv, maps the originalif (...) return EXIT_FAILUREchecks to the most specificEXPECT_*macro, and was built and run locally (ITKCommonGTestDriver, macOS arm64 Release) — all converted tests pass.Per-commit summary
itkVersorTest→itkVersorGTestTEST(Versor, ConvertedLegacyTest);Math::Absolute(a-b) > eps→EXPECT_NEAR, two throw-expecting blocks →EXPECT_THROW; helpers in an anonymous namespaceitkImageVectorOptimizerParametersHelperTest→…GTestEXPECT_EQ(exact);ITK_TRY_EXPECT_EXCEPTION→EXPECT_THROWitkImageAlgorithmCopyTest2→itkImageAlgorithmCopyGTest2ITK_TEST_EXPECT_TRUE(CheckBuffer(...))→EXPECT_TRUE(genuine boolean predicate)itkCompensatedSummationTest2→ appended toitkCompensatedSummationGTestTEST(CompensatedSummation, ConvertedLegacyTest2)with the multi-thread helper;Absolute(ref-comp) > Absolute(ref-uncomp)→EXPECT_LEitkNumericsTest→itkNumericsGTest[7,0,0]and the singular minimum-norm solution[35/6, 7/3, -7/6]; expected values captured from the real run and cross-checked against the null-space projection