-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic profile generation and processing [ci skip]
- Loading branch information
Showing
5 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var tape = require("tape"); | ||
|
||
var protobuf = require(".."); | ||
|
||
tape.test("empty messages", function(test) { | ||
var root = new protobuf.Root().addJSON({ | ||
"Test": { | ||
fields: {} | ||
} | ||
}); | ||
|
||
var Test = root.lookup("Test"); | ||
var buf = Test.encodeDelimited({}).finish(); | ||
test.equal(buf.length, 1, "should encodeDelimited to a buffer of length 1"); | ||
test.equal(buf[0], 0, "should encodeDelimited a length of 0"); | ||
test.end(); | ||
}); |