Fixed unit test

release/4.3a0
Frank Dellaert 2013-10-26 04:27:05 +00:00
parent c4747fdf69
commit 17a74da786
1 changed files with 5 additions and 2 deletions

View File

@ -22,9 +22,11 @@
#include <boost/assign/std/vector.hpp> #include <boost/assign/std/vector.hpp>
#include <boost/assign/list_of.hpp> #include <boost/assign/list_of.hpp>
#include <boost/range/adaptor/map.hpp>
using namespace std; using namespace std;
using namespace boost::assign; using namespace boost::assign;
using boost::adaptors::map_keys;
using namespace gtsam; using namespace gtsam;
/* ************************************************************************* */ /* ************************************************************************* */
@ -180,8 +182,9 @@ TEST(VectorValues, convert)
VectorValues actual(x,dims); VectorValues actual(x,dims);
EXPECT(assert_equal(expected, actual)); EXPECT(assert_equal(expected, actual));
// Test other direction // Test other direction, note vector() is not guaranteed to give right result
EXPECT(assert_equal(x, actual.vector())); FastVector<Key> keys = list_of(0)(1)(2)(5);
EXPECT(assert_equal(x, actual.vector(keys)));
} }
/* ************************************************************************* */ /* ************************************************************************* */