Skip to content
Snippets Groups Projects
Commit 4f06e582 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Fix gtest_problem

parent f2bcf333
No related branches found
No related tags found
No related merge requests found
Pipeline #3203 passed
...@@ -244,7 +244,7 @@ TEST(Problem, StateBlocks) ...@@ -244,7 +244,7 @@ TEST(Problem, StateBlocks)
// 2 state blocks, fixed // 2 state blocks, fixed
SensorBasePtr St = P->installSensor ("ODOM 2D", "other odometer", xs2d, ""); 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>(); ProcessorParamsTrackerFeaturePtr params = std::make_shared<ProcessorParamsTrackerFeature>();
params->time_tolerance = 0.1; params->time_tolerance = 0.1;
...@@ -257,7 +257,7 @@ TEST(Problem, StateBlocks) ...@@ -257,7 +257,7 @@ TEST(Problem, StateBlocks)
// 2 state blocks, estimated // 2 state blocks, estimated
auto KF = P->emplaceFrame("PO", 3, KEY, xs3d, 0); 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 // Notifications
Notification notif; Notification notif;
...@@ -269,7 +269,7 @@ TEST(Problem, StateBlocks) ...@@ -269,7 +269,7 @@ TEST(Problem, StateBlocks)
// change some SB properties // change some SB properties
St->unfixExtrinsics(); 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_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->getStateBlockPtrList().size(), (SizeStd)(2 + 2 + 2));
// ASSERT_EQ(P->getStateBlockNotificationMap().size(),(SizeStd)(2 + 2 + 2 /*+ 2*/)); // XXX: 2 more notifications on the same SB! // 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) ...@@ -278,7 +278,7 @@ TEST(Problem, StateBlocks)
// consume notifications // consume notifications
DummySolverManagerPtr SM = std::make_shared<DummySolverManager>(P); 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(); SM->update(); // calls P->consumeStateBlockNotificationMap();
ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (0)); // consume empties the notification map ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (0)); // consume empties the notification map
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment