diff options
author | Yilun Chong <yilunchong@google.com> | 2017-06-28 15:32:59 -0700 |
---|---|---|
committer | Yilun Chong <yilunchong@google.com> | 2017-06-28 15:32:59 -0700 |
commit | db379e6e69196993f1c1e54512afe06b39cb97eb (patch) | |
tree | b01aed2fbab79dd5c06ccc4384bbd42e873eb350 /csharp/src | |
parent | ff773c1aaf8a9cb8617f894f0d179329ba56f146 (diff) | |
download | protobuf-db379e6e69196993f1c1e54512afe06b39cb97eb.tar.gz protobuf-db379e6e69196993f1c1e54512afe06b39cb97eb.tar.bz2 protobuf-db379e6e69196993f1c1e54512afe06b39cb97eb.zip |
fix csharp conformance test
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Google.Protobuf.Conformance/Program.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index 8359caf7..437fa3a2 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -91,22 +91,22 @@ namespace Google.Protobuf.Conformance message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypes>(request.JsonPayload); break; case ConformanceRequest.PayloadOneofCase.ProtobufPayload: - { - if (request.MessageType.Equals("proto3")) - { - message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); - } - else if (request.MessageType.Equals("proto2")) - { - response.Skipped = "CSharp doesn't support proto2"; - return response; - } - else - { - throw new Exception(" Protobuf request doesn't have specific payload type"); - } - break; - } + { + if (request.MessageType.Equals("proto3")) + { + message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); + } + else if (request.MessageType.Equals("proto2")) + { + + return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" } + } + else + { + throw new Exception(" Protobuf request doesn't have specific payload type"); + } + break; + } default: throw new Exception("Unsupported request payload: " + request.PayloadCase); } |