-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow naming expectations #3970
Labels
Comments
I just tried this and I see that line numbers are printed. Does that not allow you to figure out which expectation failed?
|
Unfortunately, the line number becomes less useful if the expectations are set in a method that gets called in different places |
ghost
mentioned this issue
Oct 20, 2022
gaspardpetit
pushed a commit
to eidosmontreal/googletest
that referenced
this issue
Feb 24, 2023
Signed-off-by: Denis Hananein <i@zloylos.me>
kunitoki
pushed a commit
to kunitoki/googletest
that referenced
this issue
Nov 4, 2023
Signed-off-by: Denis Hananein <i@zloylos.me>
This can be closed now that #4041 got merged, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does the feature exist in the most recent commit?
No
Why do we need this feature?
When a test has multiple
EXPECT_CALL
s on the same function, it becomes difficult to determine which expectation is unmet.Allowing the naming of expectations allows for more helpful error messages to help pinpoint which expectation failed.
Describe the proposal
Allow the specifying of name in the
EXPECT_CALL
which should produce the following error message on failure
Related: #3683
The text was updated successfully, but these errors were encountered: