Skip to content
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

Protocol buffer messages are not being pretty printed #1102

Closed
rohitsaboo opened this issue May 25, 2017 · 2 comments
Closed

Protocol buffer messages are not being pretty printed #1102

rohitsaboo opened this issue May 25, 2017 · 2 comments

Comments

@rohitsaboo
Copy link

rohitsaboo commented May 25, 2017

I'm unable to get protocol buffer messages to be pretty printed in my gtest failure messages.

My guess is that

ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
checks if the type is convertible to proto2::Message in order to pretty print protocol buffer messages, whereas in the open source implementation of protobufs, the type seems to be google::protobuf::Message.

@gennadiycivil
Copy link
Contributor

I have been cleaning up older and inactive GitHub googletest issues. You may see an issue "closed" if it appears to be inactive/abandoned
Thank you

@inazarenko
Copy link
Contributor

Open source protobuf messages derive from google::protobuf::MessageLite.

GTest enables ProtbufPrinter based on:

template <typename T>
struct IsAProtocolMessage
   : public std::is_convertible<const T*, const ::proto2::MessageLite*> {};

So open-source protobufs are printed as bytes.

This was previously closed as "inactive": #1102

The issue still occurs at current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants