Skip to content

Commit 5ef5656

Browse files
author
Daniel Wirtz
committed
Fixed pbjsi19 test
1 parent 10e01c1 commit 5ef5656

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/suite.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,21 @@ var suite = {
725725
});
726726
test.done();
727727
},
728+
729+
"protobuf.js issue 19": function(test) {
730+
// test that this issue is fixed: https://github.com/dcodeIO/ProtoBuf.js/issues/19
731+
var bb = new ByteBuffer(17);
732+
bb.writeVarint32(16);
733+
bb.writeVarint32(2);
734+
bb.writeVarint32(24);
735+
bb.writeVarint32(0);
736+
bb.writeVarint32(32);
737+
bb.writeVarint64(ByteBuffer.Long.fromString("1368057600000"));
738+
bb.writeVarint32(40);
739+
bb.writeVarint64(ByteBuffer.Long.fromString("1235455123"));
740+
test.equals(bb.toHex(17), ">10 02 18 00 20 80 B0 D9 B4 E8 27 28 93 99 8E CD 04<");
741+
test.done();
742+
},
728743

729744
"commonjs": function(test) {
730745
var fs = require("fs")

0 commit comments

Comments
 (0)