From 2bd55a9fbcd2815b3332bf309bc20f59eef0b36b Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 12 Sep 2017 15:09:47 -0700 Subject: Fix js conformance tests. (#3604) * Fix js conformance tests. * Remove old incorrect compatibility tests --- js/binary/decoder_test.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'js/binary/decoder_test.js') diff --git a/js/binary/decoder_test.js b/js/binary/decoder_test.js index d0139e29..b19e1d1b 100644 --- a/js/binary/decoder_test.js +++ b/js/binary/decoder_test.js @@ -270,24 +270,7 @@ describe('binaryDecoderTest', function() { assertThrows(function() {decoder.readSignedVarint64()}); decoder.reset(); assertThrows(function() {decoder.readZigzagVarint64()}); - - // Positive 32-bit varints encoded with 1 bits in positions 33 through 35 - // should trigger assertions. - decoder.setBlock([255, 255, 255, 255, 0x1F]); - assertThrows(function() {decoder.readUnsignedVarint32()}); - - decoder.setBlock([255, 255, 255, 255, 0x2F]); - assertThrows(function() {decoder.readUnsignedVarint32()}); - - decoder.setBlock([255, 255, 255, 255, 0x4F]); - assertThrows(function() {decoder.readUnsignedVarint32()}); - - // Negative 32-bit varints encoded with non-1 bits in the high dword should - // trigger assertions. - decoder.setBlock([255, 255, 255, 255, 255, 255, 0, 255, 255, 1]); - assertThrows(function() {decoder.readUnsignedVarint32()}); - - decoder.setBlock([255, 255, 255, 255, 255, 255, 255, 255, 255, 0]); + decoder.reset(); assertThrows(function() {decoder.readUnsignedVarint32()}); }); -- cgit v1.2.3