-
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
Fixes the test gmock_output_test.py with MSVC in a better way #4146
Conversation
This reverts commit 0a3b403.
a887510
to
ab4198a
Compare
Can you describe what the issue is and why this fix is better (and what it's better than?) |
updated the reason |
Sorry, I'm still not sure I understand what the problem is here. Could you answer:
|
For MSVC, gmock_output_test.py output struct std::pair<int,bool>, for GCC, it's output
ditto.
The new solution can use #ifdef _MSC_VER
#define ERROR_DESC "class std::runtime_error"
#else
#define ERROR_DESC "std::runtime_error"
#endif can be simplified to #define ERROR_DESC "std::runtime_error" cc @asoffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits, but otherwise looks great. Thank you!
ab4198a
to
ece8033
Compare
For MSVC, gmock_output_test.py output struct std::pair<int,bool>, for GCC, it's output std::pair<int, bool>, it's not the same, my intention is getting these to be same by removing struct for MSVC's outptu, and strip redundant space for GCC. As a by-product, ``` #ifdef _MSC_VER #define ERROR_DESC "class std::runtime_error" #else #define ERROR_DESC "std::runtime_error" #endif ``` can be simplified to ``` #define ERROR_DESC "std::runtime_error" ``` Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
ece8033
to
6f1c4b3
Compare
@asoffer updated, can this be merged now? |
@derekmauro @asoffer ping? |
Apologies for the delay. Pulling this in. |
cc @thughes
After this mr:
the std::pair<> can be used directly
And the hacky for
are no more needed
we can using
directly