Skip to content
Snippets Groups Projects

Resolve "Emplace API inconsistent with ProcessorTrackerFeature/Landmark functions"

1 file
+ 12
3
Compare changes
  • Side-by-side
  • Inline
@@ -465,12 +465,17 @@ TEST(SolverManager, AddUpdatedStateBlock)
// Fix --> FLAG
sb_ptr->unfix();
// Check flag has been set true
ASSERT_TRUE(sb_ptr->fixUpdated());
ASSERT_EQ(P->getStateBlockNotificationMapSize(),1); // No new notifications (fix and set state are flags in sb)
// == consume empties the notification map ==
solver_manager_ptr->update(); // it calls P->consumeStateBlockNotificationMap();
ASSERT_EQ(P->getStateBlockNotificationMapSize(),0);
// Check flags have been reset
ASSERT_FALSE(sb_ptr->fixUpdated());
ASSERT_FALSE(sb_ptr->stateUpdated());
// == When an REMOVE is notified: a REMOVE notification should be stored ==
@@ -481,10 +486,9 @@ TEST(SolverManager, AddUpdatedStateBlock)
ASSERT_TRUE(P->getStateBlockNotification(sb_ptr, notif));
ASSERT_EQ(notif, REMOVE);
// == ADD + REMOVE: notification map should be empty ==
// == REMOVE + ADD: notification map should be empty ==
P->notifyStateBlock(sb_ptr,ADD);
P->notifyStateBlock(sb_ptr,REMOVE);
ASSERT_TRUE(P->getStateBlockNotificationMapSize() == 0);
ASSERT_EQ(P->getStateBlockNotificationMapSize(),0);
// == UPDATES should clear the list of notifications ==
// add state_block
@@ -494,6 +498,11 @@ TEST(SolverManager, AddUpdatedStateBlock)
solver_manager_ptr->update();
ASSERT_EQ(P->getStateBlockNotificationMapSize(),0); // After solver_manager->update, notifications should be empty
// == ADD + REMOVE: notification map should be empty ==
P->notifyStateBlock(sb_ptr,ADD);
P->notifyStateBlock(sb_ptr,REMOVE);
ASSERT_EQ(P->getStateBlockNotificationMapSize(),0);
}
TEST(SolverManager, AddFactor)
Loading