Commit db379e6e authored by Yilun Chong's avatar Yilun Chong

fix csharp conformance test

parent ff773c1a
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment