Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
6d29c22a
Commit
6d29c22a
authored
Feb 26, 2019
by
Yilun Chong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix conformance test for text format
parent
af8b91b8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
conformance_nodejs.js
conformance/conformance_nodejs.js
+4
-0
conformance_php.php
conformance/conformance_php.php
+4
-1
conformance_ruby.rb
conformance/conformance_ruby.rb
+6
-0
Program.cs
csharp/src/Google.Protobuf.Conformance/Program.cs
+4
-0
No files found.
conformance/conformance_nodejs.js
View file @
6d29c22a
...
...
@@ -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
;
...
...
conformance/conformance_php.php
View file @
6d29c22a
...
...
@@ -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
);
}
...
...
conformance/conformance_ruby.rb
View file @
6d29c22a
...
...
@@ -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"
...
...
csharp/src/Google.Protobuf.Conformance/Program.cs
View file @
6d29c22a
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment