diff options
author | Yilun Chong <yilunchong@google.com> | 2017-06-30 17:22:32 -0700 |
---|---|---|
committer | Yilun Chong <yilunchong@google.com> | 2017-06-30 17:22:32 -0700 |
commit | 3adb054bbfa83530ca5a5fd54a856755fd72af83 (patch) | |
tree | 4d09a00969cdc7833dca181d6910b79f5ac877ae /csharp | |
parent | a7d5be6a910caabc4b26d73bc5c369dbc638c4c3 (diff) |
add some test proto2 supported, add js proto2 supported, fixed some error
Diffstat (limited to 'csharp')
-rw-r--r-- | csharp/src/Google.Protobuf.Conformance/Program.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index 2f30036c..96dc354e 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -48,7 +48,7 @@ namespace Google.Protobuf.Conformance // This way we get the binary streams instead of readers/writers. var input = new BinaryReader(Console.OpenStandardInput()); var output = new BinaryWriter(Console.OpenStandardOutput()); - var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypes.Descriptor); + var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor); int count = 0; while (RunTest(input, output, typeRegistry)) @@ -81,20 +81,20 @@ namespace Google.Protobuf.Conformance private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) { - ProtobufTestMessages.Proto3.TestAllTypes message; + ProtobufTestMessages.Proto3.TestAllTypesProto3 message; try { switch (request.PayloadCase) { case ConformanceRequest.PayloadOneofCase.JsonPayload: var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry)); - message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypes>(request.JsonPayload); + message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypesProto3>(request.JsonPayload); break; case ConformanceRequest.PayloadOneofCase.ProtobufPayload: { - if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypes")) + if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypesProto3")) { - message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); + message = ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser.ParseFrom(request.ProtobufPayload); } else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2")) { |