diff --git a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp index f3099778f..45936fc8e 100644 --- a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp +++ b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp @@ -462,10 +462,24 @@ typedef mpl::transform >::type Jacobians; BOOST_MPL_ASSERT((mpl::equal< ExpectedJacobians, Jacobians >)); // Try accessing a Jacobian -typedef mpl::int_<1> one; -typedef mpl::at::type Jacobian23; // base zero ! +typedef mpl::at_c::type Jacobian23; // base zero ! BOOST_MPL_ASSERT((boost::is_same< Matrix23, Jacobian23>)); +#include +#include +#include + +// Create a value and access it +TEST(ExpressionFactor, JacobiansValue) { + Matrix23 expected; + ExpectedJacobians jacobians; + using boost::fusion::at_c; + + Matrix23 actual = at_c<1>(jacobians); + CHECK(actual.cols() == expected.cols()); + CHECK(actual.rows() == expected.rows()); +} + /* ************************************************************************* */ int main() { TestResult tr;