aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilun Chong <yilunchong@google.com>2018-08-01 13:24:54 -0700
committerYilun Chong <yilunchong@google.com>2018-08-01 13:24:54 -0700
commit1bec76f04cbaee8c48fecb2c21ff1015f398caf5 (patch)
treef43fd81282c650d5fa2da7bff4b077556949692b
parent2ab6cb457028b322a9daba45e356f3fab26107e7 (diff)
downloadprotobuf-1bec76f04cbaee8c48fecb2c21ff1015f398caf5.tar.gz
protobuf-1bec76f04cbaee8c48fecb2c21ff1015f398caf5.tar.bz2
protobuf-1bec76f04cbaee8c48fecb2c21ff1015f398caf5.zip
fix
-rw-r--r--js/binary/reader_test.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/binary/reader_test.js b/js/binary/reader_test.js
index 28f135bf..e1e6efa1 100644
--- a/js/binary/reader_test.js
+++ b/js/binary/reader_test.js
@@ -679,8 +679,13 @@ describe('binaryReaderTest', function() {
writer.writeInt32(5, sentinel);
var dummyMessage = /** @type {!jspb.BinaryMessage} */({});
writer.writeGroup(5, dummyMessage, function() {
- writer.writeInt64(42, 42);
+ // Previously the skipGroup implementation was wrong, which only consume
+ // the decoder by nextField. This case is for making the previous
+ // implementation failed in skipGroup by an early end group tag.
writer.writeInt64(44, 44);
+ writer.writeInt64(42, 42);
+ // This is for making the previous implementation failed by an invalid
+ // varint.
writer.writeBytes(43, [255, 255, 255, 255, 255, 255, 255, 255, 255, 255]);
writer.writeGroup(6, dummyMessage, function() {
writer.writeInt64(84, 42);