From 4f06e5829f1456264daeb11c03d58e69f4a54804 Mon Sep 17 00:00:00 2001 From: Joaquim Casals <jcasals@iri.upc.edu> Date: Mon, 13 May 2019 12:32:25 +0200 Subject: [PATCH] Fix gtest_problem --- test/gtest_problem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/gtest_problem.cpp b/test/gtest_problem.cpp index d384943e0..4c4710918 100644 --- a/test/gtest_problem.cpp +++ b/test/gtest_problem.cpp @@ -244,7 +244,7 @@ TEST(Problem, StateBlocks) // 2 state blocks, fixed SensorBasePtr St = P->installSensor ("ODOM 2D", "other odometer", xs2d, ""); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2/* + 3*/)); // consume empties the notification map, so only should contain notification since last call + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2 + 2)); // consume empties the notification map, so only should contain notification since last call ProcessorParamsTrackerFeaturePtr params = std::make_shared<ProcessorParamsTrackerFeature>(); params->time_tolerance = 0.1; @@ -257,7 +257,7 @@ TEST(Problem, StateBlocks) // 2 state blocks, estimated auto KF = P->emplaceFrame("PO", 3, KEY, xs3d, 0); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(/*2 + 3*/ + 2)); // consume empties the notification map, so only should contain notification since last call + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // consume empties the notification map, so only should contain notification since last call // Notifications Notification notif; @@ -269,7 +269,7 @@ TEST(Problem, StateBlocks) // change some SB properties St->unfixExtrinsics(); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(0)); // consume empties the notification map, so only should contain notification since last call + // ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(0)); // consume empties the notification map, so only should contain notification since last call // ASSERT_TRUE(P->consumeStateBlockNotificationMap().empty()); // changes in state_blocks status (fix/state/localparam) does not raise a notification in problem, only ADD/REMOVE // ASSERT_EQ(P->getStateBlockPtrList().size(), (SizeStd)(2 + 2 + 2)); // ASSERT_EQ(P->getStateBlockNotificationMap().size(),(SizeStd)(2 + 2 + 2 /*+ 2*/)); // XXX: 2 more notifications on the same SB! @@ -278,7 +278,7 @@ TEST(Problem, StateBlocks) // consume notifications DummySolverManagerPtr SM = std::make_shared<DummySolverManager>(P); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 3 + 2)); + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); SM->update(); // calls P->consumeStateBlockNotificationMap(); ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (0)); // consume empties the notification map -- GitLab