@@ -745,3 +745,31 @@ TEST(BlackboardTest, SetBlackboard_WithPortRemapping)
745745 // Tick till the end with no crashes
746746 ASSERT_NO_THROW (tree.tickWhileRunning (););
747747}
748+
749+ // Issue #408: debugMessage should show remapped entries from parent blackboard
750+ TEST (BlackboardTest, DebugMessageShowsRemappedEntries_Issue408)
751+ {
752+ // Create parent BB with a value
753+ auto parent_bb = Blackboard::create ();
754+ parent_bb->set (" parent_value" , 42 );
755+
756+ // Create child BB with remapping
757+ auto child_bb = Blackboard::create (parent_bb);
758+ child_bb->addSubtreeRemapping (" local_name" , " parent_value" );
759+
760+ // Capture debugMessage output
761+ testing::internal::CaptureStdout ();
762+ child_bb->debugMessage ();
763+ std::string output = testing::internal::GetCapturedStdout ();
764+
765+ // The output should contain the remapped key with its type info from parent
766+ EXPECT_TRUE (output.find (" local_name" ) != std::string::npos)
767+ << " debugMessage output should mention 'local_name'. Got: " << output;
768+ EXPECT_TRUE (output.find (" parent_value" ) != std::string::npos)
769+ << " debugMessage output should mention 'parent_value'. Got: " << output;
770+ // The output should show the parent entry's type, not just the remapping
771+ EXPECT_TRUE (output.find (" int" ) != std::string::npos) << " debugMessage output should "
772+ " show the type of the remapped "
773+ " entry. Got: "
774+ << output;
775+ }
0 commit comments