From 4ee0617b5e64bb762f06181491732fbe26bb3f45 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 27 Dec 2023 16:45:38 +0100 Subject: [PATCH] BUG: Fix name returned by `GetNameOfClass()` in Optimizer tests Fixed the class names returned by the `GetNameOfClass()` member functions of `amoebaTestF2` (from "itkAmoebaOptimizerTest") and `LBFGSCostFunction` (from "itkLBFGSOptimizerTest"), by passing the correct class name to `itkOverrideGetNameOfClassMacro`. --- Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx | 2 +- Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx index 7a16d862853..7253e33b843 100644 --- a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx @@ -161,7 +161,7 @@ class amoebaTestF2 : public itk::SingleValuedCostFunction using Pointer = itk::SmartPointer; using ConstPointer = itk::SmartPointer; itkNewMacro(Self); - itkOverrideGetNameOfClassMacro(amoebaTestF1); + itkOverrideGetNameOfClassMacro(amoebaTestF2); using ParametersType = Superclass::ParametersType; using MeasureType = Superclass::MeasureType; diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx index 87763eee109..37dea8803ec 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx @@ -47,7 +47,7 @@ class LBFGSCostFunction : public itk::SingleValuedCostFunction using Pointer = itk::SmartPointer; using ConstPointer = itk::SmartPointer; itkNewMacro(Self); - itkOverrideGetNameOfClassMacro(LBFCostFunction); + itkOverrideGetNameOfClassMacro(LBFGSCostFunction); enum {