Fix user iteration callbacks.
User callbacks got broken at some point due to the extra
layer of copying from Solver::Options to Minimizer::Options.
This copies the user callbacks when initializing
Minimizer::Options from Solver::Options, and adds a test to
this effect.
This also fixes a bug where the state updating callback was
not called before the user callbacks. This also adds a test
to solver_impl_test to ensure the state updating callbacks
work as expected.
Thanks to Luis Alberto Zarrabeitia for the report.
Issue: 46
Change-Id: I2b36415c89dafaa5c84ecaa727a325df122e1092
diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index 076805f..d59469c 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -182,6 +182,7 @@
CERES_TEST(levenberg_marquardt_strategy)
CERES_TEST(local_parameterization)
CERES_TEST(loss_function)
+ CERES_TEST(minimizer)
CERES_TEST(normal_prior)
CERES_TEST(numeric_diff_cost_function)
CERES_TEST(parameter_block)