diff --git a/gtsam_unstable/nonlinear/tests/testAdaptAutoDiff.cpp b/gtsam_unstable/nonlinear/tests/testAdaptAutoDiff.cpp index 0c9046d6c..edb26c4f4 100644 --- a/gtsam_unstable/nonlinear/tests/testAdaptAutoDiff.cpp +++ b/gtsam_unstable/nonlinear/tests/testAdaptAutoDiff.cpp @@ -188,7 +188,7 @@ TEST(Expression, AutoDiff3) { Matrix29 H1; Matrix23 H2; Point2 actual2 = snavely(P, X, H1, H2); - EXPECT(assert_equal(expected,actual,1e-9)); + EXPECT(assert_equal(expected,actual2,1e-9)); EXPECT(assert_equal(E1,H1,1e-8)); } @@ -200,7 +200,7 @@ TEST(Expression, Snavely) { typedef AdaptAutoDiff Adaptor; Expression expression(Adaptor(), P, X); #ifdef GTSAM_USE_QUATERNIONS - EXPECT_LONGS_EQUAL(480,expression.traceSize()); // Todo, should be zero + EXPECT_LONGS_EQUAL(400,expression.traceSize()); // Todo, should be zero #else EXPECT_LONGS_EQUAL(432,expression.traceSize()); // Todo, should be zero #endif diff --git a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp index ce8d6ac06..c63bfeb6f 100644 --- a/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp +++ b/gtsam_unstable/nonlinear/tests/testExpressionFactor.cpp @@ -165,6 +165,7 @@ TEST(ExpressionFactor, Binary) { char raw[size]; ExecutionTrace trace; Point2 value = binary.traceExecution(values, trace, raw); + EXPECT(assert_equal(Point2(),value, 1e-9)); // trace.print(); // Expected Jacobians @@ -208,8 +209,8 @@ TEST(ExpressionFactor, Shallow) { size_t expectedTraceSize = sizeof(Unary::Record) + sizeof(Binary::Record); EXPECT_LONGS_EQUAL(112, sizeof(Unary::Record)); #ifdef GTSAM_USE_QUATERNIONS - EXPECT_LONGS_EQUAL(464, sizeof(Binary::Record)); - LONGS_EQUAL(112+464, expectedTraceSize); + EXPECT_LONGS_EQUAL(352, sizeof(Binary::Record)); + LONGS_EQUAL(112+352, expectedTraceSize); #else EXPECT_LONGS_EQUAL(400, sizeof(Binary::Record)); LONGS_EQUAL(112+400, expectedTraceSize); @@ -220,6 +221,7 @@ TEST(ExpressionFactor, Shallow) { char raw[size]; ExecutionTrace trace; Point2 value = expression.traceExecution(values, trace, raw); + EXPECT(assert_equal(Point2(),value, 1e-9)); // trace.print(); // Expected Jacobians