From db379e6e69196993f1c1e54512afe06b39cb97eb Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 15:32:59 -0700 Subject: fix csharp conformance test --- csharp/src/Google.Protobuf.Conformance/Program.cs | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'csharp') 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(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); } -- cgit v1.2.3