Removed obsolete comments and added docs.
This commit is contained in:
parent
95b4427d39
commit
1b0db1cb83
2 changed files with 30 additions and 5 deletions
|
@ -19,11 +19,39 @@ directory to build `protoc`, since all the tests depend on it.
|
||||||
|
|
||||||
$ make
|
$ 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
|
$ 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
|
Testing other Protocol Buffer implementations
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
|
@ -101,11 +101,9 @@ function onEof(totalRead) {
|
||||||
function readBuffer(bytes) {
|
function readBuffer(bytes) {
|
||||||
var buf = new Buffer(bytes);
|
var buf = new Buffer(bytes);
|
||||||
var totalRead = 0;
|
var totalRead = 0;
|
||||||
//console.warn("Want to read: " + bytes);
|
|
||||||
while (totalRead < bytes) {
|
while (totalRead < bytes) {
|
||||||
var read = 0;
|
var read = 0;
|
||||||
try {
|
try {
|
||||||
//console.warn("Trying to read: " + (bytes - totalRead));
|
|
||||||
read = fs.readSync(process.stdin.fd, buf, totalRead, bytes - totalRead);
|
read = fs.readSync(process.stdin.fd, buf, totalRead, bytes - totalRead);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code == 'EOF') {
|
if (e.code == 'EOF') {
|
||||||
|
@ -116,7 +114,6 @@ function readBuffer(bytes) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.warn("Read: " + read);
|
|
||||||
totalRead += read;
|
totalRead += read;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue