aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Conformance
diff options
context:
space:
mode:
authorGravatar Yilun Chong <yilunchong@google.com>2017-06-28 15:32:59 -0700
committerGravatar Yilun Chong <yilunchong@google.com>2017-06-28 15:32:59 -0700
commitdb379e6e69196993f1c1e54512afe06b39cb97eb (patch)
treeb01aed2fbab79dd5c06ccc4384bbd42e873eb350 /csharp/src/Google.Protobuf.Conformance
parentff773c1aaf8a9cb8617f894f0d179329ba56f146 (diff)
fix csharp conformance test
Diffstat (limited to 'csharp/src/Google.Protobuf.Conformance')
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Program.cs32
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);
}