From 8f6eae922ad8c1ea4e29b314de470055f2adb5a2 Mon Sep 17 00:00:00 2001 From: dellaert Date: Wed, 1 Oct 2014 10:36:24 +0200 Subject: [PATCH] Tightened/cleaned up --- .../nonlinear/tests/testExpression.cpp | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gtsam_unstable/nonlinear/tests/testExpression.cpp b/gtsam_unstable/nonlinear/tests/testExpression.cpp index 8602bcbf3..d6da6bc01 100644 --- a/gtsam_unstable/nonlinear/tests/testExpression.cpp +++ b/gtsam_unstable/nonlinear/tests/testExpression.cpp @@ -30,15 +30,6 @@ using namespace gtsam; /* ************************************************************************* */ -Point3 transformTo(const Pose3& x, const Point3& p, - boost::optional Dpose, boost::optional Dpoint) { - return x.transform_to(p, Dpose, Dpoint); -} - -Point2 project(const Point3& p, boost::optional Dpoint) { - return PinholeCamera::project_to_camera(p, Dpoint); -} - template Point2 uncalibrate(const CAL& K, const Point2& p, boost::optional Dcal, boost::optional Dp) { @@ -47,7 +38,7 @@ Point2 uncalibrate(const CAL& K, const Point2& p, boost::optional Dcal, /* ************************************************************************* */ -TEST(BAD, test) { +TEST(Expression, test) { // Test Constant expression Expression c(0); @@ -58,11 +49,8 @@ TEST(BAD, test) { Expression K(3); // Create expression tree -// MethodExpression::method m = &Pose3::transform_to; -// MethodExpression methodExpression(x, &Pose3::transform_to, p); Expression p_cam(x, &Pose3::transform_to, p); - //Expression p_cam(transformTo, x, p); - Expression projection(project, p_cam); + Expression projection(PinholeCamera::project_to_camera, p_cam); Expression uv_hat(uncalibrate, K, projection); // Check keys @@ -75,7 +63,7 @@ TEST(BAD, test) { /* ************************************************************************* */ -TEST(BAD, compose) { +TEST(Expression, compose) { // Create expression Expression R1(1), R2(2); @@ -90,7 +78,7 @@ TEST(BAD, compose) { /* ************************************************************************* */ // Test compose with arguments referring to the same rotation -TEST(BAD, compose2) { +TEST(Expression, compose2) { // Create expression Expression R1(1), R2(1);