PilzDE / pilz_robots

PILZ robot manipulator module PRBT 6 in ROS
https://wiki.ros.org/pilz_robots
50 stars 25 forks source link

Better log output on mismatches #462

Closed agutenkunst closed 3 years ago

agutenkunst commented 3 years ago

This PR helps printing the message that was actually received in order to have more insight on the error.

Before this something like:

tried expectation #0: EXPECT_CALL(*ros_log_mock, append(IsINFO("Expected message"), ::testing::_))...
  Expected arg #0: is i n f o "Expected message"
           Actual: 16-byte object <20-E4 62-F6 56-7F 00-00 D0-08 00-E0 56-7F 00-00>
         Expected: to be called once
           Actual: called once - saturated and active

With this PR:

tried expectation #0: EXPECT_CALL(*ros_log_mock, append(IsINFO("Expected message"), ::testing::_))...
  Expected arg #0: INFO "Expected message"
           Actual: WARN "Unexpected message"
         Expected: to be called once
           Actual: called once - saturated and active