Lines Matching refs:decoder
73 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
76 assertEquals(filter(0), readValue.call(decoder));
77 assertEquals(filter(epsilon), readValue.call(decoder));
78 assertEquals(filter(upperLimit), readValue.call(decoder));
82 if (filter(cursor) != readValue.call(decoder)) throw 'fail!';
128 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
131 assertEquals(filter(lowerLimit), readValue.call(decoder));
132 assertEquals(filter(-epsilon), readValue.call(decoder));
133 assertEquals(filter(0), readValue.call(decoder));
134 assertEquals(filter(epsilon), readValue.call(decoder));
135 assertEquals(filter(upperLimit), readValue.call(decoder));
139 assertEquals(inputValues[i], readValue.call(decoder));
201 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
203 assertEquals(hashA, decoder.readVarintHash64());
204 assertEquals(hashB, decoder.readVarintHash64());
205 assertEquals(hashC, decoder.readVarintHash64());
206 assertEquals(hashD, decoder.readVarintHash64());
208 assertEquals(hashA, decoder.readFixedHash64());
209 assertEquals(hashB, decoder.readFixedHash64());
210 assertEquals(hashC, decoder.readFixedHash64());
211 assertEquals(hashD, decoder.readFixedHash64());
221 var decoder = jspb.BinaryDecoder.alloc([0, 1, 2]);
222 assertThrows(function() {decoder.readUint64()});
225 decoder.setBlock([255, 255, 255, 255, 255, 255,
227 assertThrows(function() {decoder.readUnsignedVarint64()});
228 decoder.reset();
229 assertThrows(function() {decoder.readSignedVarint64()});
230 decoder.reset();
231 assertThrows(function() {decoder.readZigzagVarint64()});
235 decoder.setBlock([255, 255, 255, 255, 0x1F]);
236 assertThrows(function() {decoder.readUnsignedVarint32()});
238 decoder.setBlock([255, 255, 255, 255, 0x2F]);
239 assertThrows(function() {decoder.readUnsignedVarint32()});
241 decoder.setBlock([255, 255, 255, 255, 0x4F]);
242 assertThrows(function() {decoder.readUnsignedVarint32()});
246 decoder.setBlock([255, 255, 255, 255, 255, 255, 0, 255, 255, 1]);
247 assertThrows(function() {decoder.readUnsignedVarint32()});
249 decoder.setBlock([255, 255, 255, 255, 255, 255, 255, 255, 255, 0]);
250 assertThrows(function() {decoder.readUnsignedVarint32()});