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
1b0db1cb
Commit
1b0db1cb
authored
Mar 16, 2017
by
Josh Haberman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed obsolete comments and added docs.
parent
95b4427d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
README.md
conformance/README.md
+30
-2
conformance_nodejs.js
conformance/conformance_nodejs.js
+0
-3
No files found.
conformance/README.md
View file @
1b0db1cb
...
...
@@ -19,11 +19,39 @@ directory to build `protoc`, since all the tests depend on it.
$ make
Then to run the tests against the C++ implementation, run:
Running the tests for C++
-------------------------
To run the tests against the C++ implementation, run:
$ cd conformance && make test_cpp
More tests and languages will be added soon!
Running the tests for JavaScript (Node.js)
------------------------------------------
To run the JavaScript tests against Node.js, make sure you have "node"
on your path and then run:
$ cd conformance && make test_nodejs
Running the tests for Ruby (MRI)
--------------------------------
To run the Ruby tests against MRI, first build the C extension:
$ cd ruby && rake
Then run the tests like so:
$ cd conformance && make test_ruby
Running the tests for other languages
-------------------------------------
Most of the languages in the Protobuf source tree are set up to run
conformance tests. However some of them are more tricky to set up
properly. See
`tests.sh`
in the base of the repository to see how
Travis runs the tests.
Testing other Protocol Buffer implementations
---------------------------------------------
...
...
conformance/conformance_nodejs.js
View file @
1b0db1cb
...
...
@@ -101,11 +101,9 @@ function onEof(totalRead) {
function
readBuffer
(
bytes
)
{
var
buf
=
new
Buffer
(
bytes
);
var
totalRead
=
0
;
//console.warn("Want to read: " + bytes);
while
(
totalRead
<
bytes
)
{
var
read
=
0
;
try
{
//console.warn("Trying to read: " + (bytes - totalRead));
read
=
fs
.
readSync
(
process
.
stdin
.
fd
,
buf
,
totalRead
,
bytes
-
totalRead
);
}
catch
(
e
)
{
if
(
e
.
code
==
'EOF'
)
{
...
...
@@ -116,7 +114,6 @@ function readBuffer(bytes) {
}
}
//console.warn("Read: " + read);
totalRead
+=
read
;
}
...
...
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