From 2e4697e7e1a002e853e28c267e7c29becb2f8c21 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Fri, 10 Aug 2012 16:10:31 +0000 Subject: [PATCH] small sanity checks on Ordering --- gtsam/nonlinear/tests/testOrdering.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtsam/nonlinear/tests/testOrdering.cpp b/gtsam/nonlinear/tests/testOrdering.cpp index beb16f741..d89c04d3c 100644 --- a/gtsam/nonlinear/tests/testOrdering.cpp +++ b/gtsam/nonlinear/tests/testOrdering.cpp @@ -44,8 +44,11 @@ TEST( testOrdering, simple_modifications ) { CHECK_EXCEPTION(ordering.pop_back(x1), std::invalid_argument); // reassemble back make the ordering 1, 2, 4, 3 - ordering.push_back(x4); - ordering.push_back(x3); + EXPECT_LONGS_EQUAL(2, ordering.push_back(x4)); + EXPECT_LONGS_EQUAL(3, ordering.push_back(x3)); + + EXPECT_LONGS_EQUAL(2, ordering[x4]); + EXPECT_LONGS_EQUAL(3, ordering[x3]); // verify Ordering expectedFinal;