We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Library version: v1.1
Proto:
syntax = "proto2"; import "google/protobuf/any.proto"; message Hello { optional string field = 1; optional google.protobuf.Any content = 2; } message Content1 { optional string field = 1; } message Content2 { optional string field = 1; }
Code:
#include <iostream> #include "src/text_format.h" #include "src/mutator.h" #include "hello.pb.h" int main() { Hello he; Content1 c1; c1.set_field("field1"); auto a = new google::protobuf::Any(); a->PackFrom(c1); he.set_allocated_content(a); std::cerr << "data:" << protobuf_mutator::SaveMessageAsText(he) << std::endl; protobuf_mutator::Mutator mutator; mutator.Seed(1); mutator.Mutate(&he, 10000); mutator.Fix(&he); std::cerr << "data:" << protobuf_mutator::SaveMessageAsText(he) << std::endl; }
Current result:
data:content { type_url: "type.googleapis.com/Content1" value: "\n\006field1" } data:content { type_url: "type.gogleapi.\303\225om/Content1" value: "\n\006field1" }
Field 'type_url' is broken and application will not accept this message. It's also possible to get a broken (unparsable) field 'value'.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Library version: v1.1
Proto:
Code:
Current result:
Field 'type_url' is broken and application will not accept this message. It's also possible to get a broken (unparsable) field 'value'.
The text was updated successfully, but these errors were encountered: