fix conformance test for text format

pull/5765/head
Yilun Chong 6 years ago
parent af8b91b828
commit 6d29c22a43
  1. 4
      conformance/conformance_nodejs.js
  2. 5
      conformance/conformance_php.php
  3. 6
      conformance/conformance_ruby.rb
  4. 4
      csharp/src/Google.Protobuf.Conformance/Program.cs

@ -76,6 +76,10 @@ function doTest(request) {
response.setSkipped("JSON not supported.");
return response;
case conformance.ConformanceRequest.PayloadCase.TEXT_PAYLOAD:
response.setSkipped("Text format not supported.");
return response;
case conformance.ConformanceRequest.PayloadCase.PAYLOAD_NOT_SET:
response.setRuntimeError("Request didn't have payload");
return response;

@ -57,7 +57,10 @@ function doTest($request)
$response->setParseError($e->getMessage());
return $response;
}
} else {
} elseif ($request->getPayload() == "text_payload") {
$response->setSkipped("PHP doesn't support text format yet");
return $response;
} else {
trigger_error("Request didn't have payload.", E_USER_ERROR);
}

@ -66,6 +66,12 @@ def do_test(request)
response.parse_error = err.message.encode('utf-8')
return response
end
when :text_payload
begin
response.skipped = "Ruby doesn't support proto2"
return response
end
when nil
fail "Request didn't have payload"

@ -109,6 +109,10 @@ namespace Google.Protobuf.Conformance
}
break;
}
case ConformanceRequest.PayloadOneofCase.TextPayload:
{
return new ConformanceResponse { Skipped = "CSharp doesn't support text format" };
}
default:
throw new Exception("Unsupported request payload: " + request.PayloadCase);
}

Loading…
Cancel
Save