Skip to content

Commit

Permalink
Fix csharp
Browse files Browse the repository at this point in the history
  • Loading branch information
TeBoring committed Jul 26, 2018
1 parent 142eb93 commit 1928e05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions conformance/failure_list_csharp.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
Recommended.Proto3.JsonInput.BytesFieldBase64Url.JsonOutput
Recommended.Proto3.JsonInput.BytesFieldBase64Url.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonFalse.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonNull.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonNumber.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonObject.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonString.ProtobufOutput
Required.Proto3.JsonInput.IgnoreUnknownJsonTrue.ProtobufOutput
3 changes: 3 additions & 0 deletions csharp/src/Google.Protobuf.Conformance/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ private static ConformanceResponse PerformRequest(ConformanceRequest request, Ty
switch (request.PayloadCase)
{
case ConformanceRequest.PayloadOneofCase.JsonPayload:
if (request.TestCategory == global::Conformance.TestCategory.JsonIgnoreUnknownParsingTest) {
return new ConformanceResponse { Skipped = "CSharp doesn't support skipping unknown fields in json parsing." };
}
var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry));
message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypesProto3>(request.JsonPayload);
break;
Expand Down

0 comments on commit 1928e05

Please sign in to comment.