diff --git a/test/gtest_problem.cpp b/test/gtest_problem.cpp index 3e810a8484b069fa96f320592ef3d510bb76c29d..59d10c417055b27a42e231f594ae9802cd889097 100644 --- a/test/gtest_problem.cpp +++ b/test/gtest_problem.cpp @@ -244,20 +244,19 @@ TEST(Problem, StateBlocks) // 2 state blocks, fixed SensorBasePtr St = P->installSensor ("ODOM 2D", "other odometer", xs2d, ""); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2 + 2)); // consume empties the notification map, so only should contain notification since last call + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2 + 2)); ProcessorParamsTrackerFeaturePtr params = std::make_shared<ProcessorParamsTrackerFeature>(); params->time_tolerance = 0.1; params->max_new_features = 5; params->min_features_for_keyframe = 10; - // ProcessorBasePtr pt = std::make_shared<ProcessorTrackerFeatureDummy>(ProcessorTrackerFeatureDummy(params)); + auto pt = ProcessorBase::emplace<ProcessorTrackerFeatureDummy>(St, ProcessorTrackerFeatureDummy(params)); - // St->addProcessor(pt); ProcessorBasePtr pm = P->installProcessor("ODOM 3D", "odom integrator", "odometer", wolf_root + "/demos/processor_odom_3D.yaml"); // 2 state blocks, estimated auto KF = P->emplaceFrame("PO", 3, KEY, xs3d, 0); - ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // consume empties the notification map, so only should contain notification since last call + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // Notifications Notification notif; @@ -269,10 +268,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_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! + ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // changes in state_blocks status (fix/state/localparam) does not raise a notification in problem, only ADD/REMOVE // P->print(4,1,1,1);