From 957169b5cc3024c0e147c6cf551917d53f1eb650 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Thu, 15 Aug 2013 20:22:50 +0000 Subject: [PATCH] Fixed compile in tests comparing sets of keys --- gtsam/nonlinear/tests/testLinearContainerFactor.cpp | 9 +++------ gtsam/symbolic/tests/testSymbolicJunctionTree.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gtsam/nonlinear/tests/testLinearContainerFactor.cpp b/gtsam/nonlinear/tests/testLinearContainerFactor.cpp index 549fccd3d..ed3207487 100644 --- a/gtsam/nonlinear/tests/testLinearContainerFactor.cpp +++ b/gtsam/nonlinear/tests/testLinearContainerFactor.cpp @@ -47,7 +47,7 @@ TEST( testLinearContainerFactor, generic_jacobian_factor ) { EXPECT(!actFactor.isHessian()); // check keys - std::vector expKeys; expKeys += l1, l2; + FastVector expKeys; expKeys += l1, l2; EXPECT(assert_container_equality(expKeys, actFactor.keys())); Values values; @@ -229,10 +229,7 @@ TEST( testLinearContainerFactor, hessian_factor_withlinpoints ) { /* ************************************************************************* */ TEST( testLinearContainerFactor, creation ) { // Create a set of local keys (No robot label) - Key l1 = 11, l2 = 12, - l3 = 13, l4 = 14, - l5 = 15, l6 = 16, - l7 = 17, l8 = 18; + Key l1 = 11, l3 = 13, l5 = 15; // create a linear factor SharedDiagonal model = noiseModel::Unit::Create(2); @@ -249,7 +246,7 @@ TEST( testLinearContainerFactor, creation ) { LinearContainerFactor actual(linear_factor, full_values); // Verify the keys - std::vector expKeys; + FastVector expKeys; expKeys += l3, l5; EXPECT(assert_container_equality(expKeys, actual.keys())); diff --git a/gtsam/symbolic/tests/testSymbolicJunctionTree.cpp b/gtsam/symbolic/tests/testSymbolicJunctionTree.cpp index 07c0c58e7..49b14bc07 100644 --- a/gtsam/symbolic/tests/testSymbolicJunctionTree.cpp +++ b/gtsam/symbolic/tests/testSymbolicJunctionTree.cpp @@ -42,14 +42,14 @@ TEST( JunctionTree, constructor ) SymbolicJunctionTree actual(SymbolicEliminationTree(simpleChain, order)); - vector frontal1 = list_of(2)(3); - vector frontal2 = list_of(0)(1); - vector sep1; - vector sep2 = list_of(2); - EXPECT(assert_equal(frontal1, actual.roots().front()->keys)); + SymbolicJunctionTree::Node::Keys + frontal1 = list_of(2)(3), + frontal2 = list_of(0)(1), + sep1, sep2 = list_of(2); + EXPECT(assert_container_equality(frontal1, actual.roots().front()->keys)); //EXPECT(assert_equal(sep1, actual.roots().front()->separator)); LONGS_EQUAL(1, (long)actual.roots().front()->factors.size()); - EXPECT(assert_equal(frontal2, actual.roots().front()->children.front()->keys)); + EXPECT(assert_container_equality(frontal2, actual.roots().front()->children.front()->keys)); //EXPECT(assert_equal(sep2, actual.roots().front()->children.front()->separator)); LONGS_EQUAL(2, (long)actual.roots().front()->children.front()->factors.size()); EXPECT(assert_equal(*simpleChain[2], *actual.roots().front()->factors[0]));