Skip to content

Commit

Permalink
using using for boost placeholders in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acxz committed Jun 20, 2021
1 parent 42c0eb6 commit 155fafa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gtsam/navigation/tests/testManifoldPreintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "imuFactorTesting.h"

using namespace boost::placeholders;

namespace testing {
// Create default parameters with Z-down and above noise parameters
static boost::shared_ptr<PreintegrationParams> Params() {
Expand Down Expand Up @@ -98,9 +100,7 @@ TEST(ManifoldPreintegration, computeError) {
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
boost::function<Vector9(const NavState&, const NavState&,
const imuBias::ConstantBias&)> f =
boost::bind(&ManifoldPreintegration::computeError, pim,
boost::placeholders::_1, boost::placeholders::_2,
boost::placeholders::_3,
boost::bind(&ManifoldPreintegration::computeError, pim, _1, _2, _3,
boost::none, boost::none, boost::none);
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
Expand Down
6 changes: 3 additions & 3 deletions gtsam/navigation/tests/testTangentPreintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "imuFactorTesting.h"

using namespace boost::placeholders;

static const double kDt = 0.1;

Vector9 f(const Vector9& zeta, const Vector3& a, const Vector3& w) {
Expand Down Expand Up @@ -105,9 +107,7 @@ TEST(TangentPreintegration, computeError) {
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
boost::function<Vector9(const NavState&, const NavState&,
const imuBias::ConstantBias&)> f =
boost::bind(&TangentPreintegration::computeError, pim,
boost::placeholders::_1, boost::placeholders::_2,
boost::placeholders::_3,
boost::bind(&TangentPreintegration::computeError, pim, _1, _2, _3,
boost::none, boost::none, boost::none);
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
Expand Down

0 comments on commit 155fafa

Please sign in to comment.