googletest icon indicating copy to clipboard operation
googletest copied to clipboard

[Enhancement]: EXPECT_CALL shall output custom message on pass same as on fail with control

Open t0w2 opened this issue 2 years ago • 1 comments

Describe the issue

Today EXPECT_CALL only output custom message on fail. It would be nice if it also output custom message on pass if developer choose so with a flag or configuration.

Steps to reproduce the problem

EXPECT_TRUE(true) << "custom message";

What version of GoogleTest are you using?

What operating system and version are you using?

What compiler and version are you using?

What build system are you using?

Additional context

No response

t0w2 avatar Mar 02 '23 18:03 t0w2

Thanks for the proposal. We currently have no plans to implement this. We would consider accepting a pull request if it did not significantly modify existing APIs. If the change did modify existing APIs dramatically, we would want to discuss it on this issue first.

One more thing of note is that we do not want a configuration option for this. We would prefer something like testing::Log() << "custom message"; that could be used unconditionally.

asoffer avatar Mar 06 '23 20:03 asoffer