Skip to content

Commit

Permalink
ENH: Increase coverage for itk::ObjectToObjectOptimizerBaseTemplate
Browse files Browse the repository at this point in the history
Increase coverage for `itk::ObjectToObjectOptimizerBaseTemplate`: test
the `CanUseScales` method and the Set/Get/Boolean macros for the
`DoEstimateScales` ivar.

Take advantage of the commit to remove an uninformative comment.
  • Loading branch information
jhlegarreta authored and dzenanz committed Nov 8, 2023
1 parent adb447f commit 3324ef0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ AmoebaTest1()
ITK_EXERCISE_BASIC_OBJECT_METHODS(itkOptimizer, AmoebaOptimizerv4, SingleValuedNonLinearVnlOptimizerv4);


ITK_TEST_EXPECT_TRUE(itkOptimizer->CanUseScales());

bool doEstimateScales = true;
ITK_TEST_SET_GET_BOOLEAN(itkOptimizer, DoEstimateScales, doEstimateScales);

// set optimizer parameters
itk::SizeValueType numberOfIterations = 10;
itkOptimizer->SetNumberOfIterations(numberOfIterations);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ itkGradientDescentOptimizerBasev4Test(int, char *[])
auto metric = MetricType::New();
auto optimizer = GradientDescentOptimizerBasev4TestOptimizer::New();

/* exercise some methods */
bool doEstimateScales = true;
ITK_TEST_SET_GET_BOOLEAN(optimizer, DoEstimateScales, doEstimateScales);

optimizer->SetMetric(metric);
ITK_TEST_SET_GET_VALUE(metric, optimizer->GetMetric());

Expand Down

0 comments on commit 3324ef0

Please sign in to comment.