79579045

Date: 2025-04-17 10:39:50
Score: 0.5
Natty:
Report link

Re-reading matchers reference, I found ResultOf which works with a lambda and provides a nice output on error:

testing::ResultOf("y", [](const auto& s) { return s.y; }, expected_y);
Expected arg #0: whose y is equal to 3
         Actual: whose y is 7
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Dominik Kaszewski