Commit 6d29c22a authored by Yilun Chong's avatar Yilun Chong

fix conformance test for text format

parent af8b91b8
...@@ -76,6 +76,10 @@ function doTest(request) { ...@@ -76,6 +76,10 @@ function doTest(request) {
response.setSkipped("JSON not supported."); response.setSkipped("JSON not supported.");
return response; return response;
case conformance.ConformanceRequest.PayloadCase.TEXT_PAYLOAD:
response.setSkipped("Text format not supported.");
return response;
case conformance.ConformanceRequest.PayloadCase.PAYLOAD_NOT_SET: case conformance.ConformanceRequest.PayloadCase.PAYLOAD_NOT_SET:
response.setRuntimeError("Request didn't have payload"); response.setRuntimeError("Request didn't have payload");
return response; return response;
......
...@@ -57,7 +57,10 @@ function doTest($request) ...@@ -57,7 +57,10 @@ function doTest($request)
$response->setParseError($e->getMessage()); $response->setParseError($e->getMessage());
return $response; 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); trigger_error("Request didn't have payload.", E_USER_ERROR);
} }
......
...@@ -66,6 +66,12 @@ def do_test(request) ...@@ -66,6 +66,12 @@ def do_test(request)
response.parse_error = err.message.encode('utf-8') response.parse_error = err.message.encode('utf-8')
return response return response
end end
when :text_payload
begin
response.skipped = "Ruby doesn't support proto2"
return response
end
when nil when nil
fail "Request didn't have payload" fail "Request didn't have payload"
......
...@@ -109,6 +109,10 @@ namespace Google.Protobuf.Conformance ...@@ -109,6 +109,10 @@ namespace Google.Protobuf.Conformance
} }
break; break;
} }
case ConformanceRequest.PayloadOneofCase.TextPayload:
{
return new ConformanceResponse { Skipped = "CSharp doesn't support text format" };
}
default: default:
throw new Exception("Unsupported request payload: " + request.PayloadCase); 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