Classes | |
enum | InputType |
class | RepeatingInputStream |
class | SmallBlockInputStream |
Public Member Functions | |
void | testCompatibleTypes () throws Exception |
void | testCompatibleTypes () throws Exception |
void | testCurrentLimitExceeded () throws Exception |
void | testCurrentLimitExceeded () throws Exception |
void | testDecodeZigZag () throws Exception |
void | testDecodeZigZag () throws Exception |
void | testInvalidInputYieldsInvalidProtocolBufferException_readBytes () throws Exception |
void | testInvalidInputYieldsInvalidProtocolBufferException_readTag () throws Exception |
void | testInvalidTag () throws Exception |
void | testInvalidTag () throws Exception |
void | testIsAtEnd () throws Exception |
void | testIsAtEnd () throws Exception |
void | testIterableByteBufferInputStreamReadBytesWithAlias () throws Exception |
void | testMaliciousInputStream () throws Exception |
void | testMaliciousInputStream () throws Exception |
void | testMaliciousRecursion () throws Exception |
void | testMaliciousRecursion () throws Exception |
void | testParseMessagesCloseTo2G () throws IOException |
void | testParseMessagesCloseTo2G () throws IOException |
void | testParseMessagesOver2G () throws IOException |
void | testParseMessagesOver2G () throws IOException |
void | testReadByteArray () throws Exception |
void | testReadByteArray () throws Exception |
void | testReadByteBuffer () throws Exception |
void | testReadByteBuffer () throws Exception |
void | testReadByteBufferAliasing () throws Exception |
void | testReadByteBufferAliasing () throws Exception |
void | testReadFromSlice () throws Exception |
void | testReadFromSlice () throws Exception |
void | testReadHugeBlob () throws Exception |
void | testReadHugeBlob () throws Exception |
void | testReadLargeByteArrayFromInputStream () throws Exception |
void | testReadLargeByteArrayFromInputStream () throws Exception |
void | testReadLargeByteStringFromInputStream () throws Exception |
void | testReadLargeByteStringFromInputStream () throws Exception |
void | testReadLittleEndian () throws Exception |
void | testReadLittleEndian () throws Exception |
void | testReadMaliciouslyLargeBlob () throws Exception |
void | testReadMaliciouslyLargeBlob () throws Exception |
void | testReadString () throws Exception |
void | testReadString () throws Exception |
void | testReadStringInvalidUtf8 () throws Exception |
void | testReadStringInvalidUtf8 () throws Exception |
void | testReadStringRequireUtf8 () throws Exception |
void | testReadStringRequireUtf8 () throws Exception |
void | testReadStringRequireUtf8InvalidUtf8 () throws Exception |
void | testReadStringRequireUtf8InvalidUtf8 () throws Exception |
void | testReadVarint () throws Exception |
void | testReadVarint () throws Exception |
void | testReadWholeMessage () throws Exception |
void | testReadWholeMessage () throws Exception |
void | testRefillBufferWithCorrectSize () throws Exception |
void | testRefillBufferWithCorrectSize () throws Exception |
void | testResetSizeCounter () throws Exception |
void | testResetSizeCounter () throws Exception |
void | testSizeLimit () throws Exception |
void | testSizeLimit () throws Exception |
void | testSizeLimitMultipleMessages () throws Exception |
void | testSizeLimitMultipleMessages () throws Exception |
void | testSkipHugeBlob () throws Exception |
void | testSkipHugeBlob () throws Exception |
void | testSkipInvalidVarint_FastPath () throws Exception |
void | testSkipInvalidVarint_FastPath () throws Exception |
void | testSkipInvalidVarint_SlowPath () throws Exception |
void | testSkipInvalidVarint_SlowPath () throws Exception |
void | testSkipMaliciouslyHugeBlob () throws Exception |
void | testSkipMaliciouslyHugeBlob () throws Exception |
void | testSkipPastEndOfByteArrayInput () throws Exception |
void | testSkipPastEndOfByteArrayInput () throws Exception |
void | testSkipRawBytesActuallySkips () throws Exception |
void | testSkipRawBytesActuallySkips () throws Exception |
void | testSkipRawBytesBug () throws Exception |
void | testSkipRawBytesBug () throws Exception |
void | testSkipRawBytesPastEndOfBufferWithLimit () throws Exception |
void | testSkipRawBytesPastEndOfBufferWithLimit () throws Exception |
void | testSkipWholeMessage () throws Exception |
void | testSkipWholeMessage () throws Exception |
Private Member Functions | |
void | assertDataConsumed (String msg, byte[] data, CodedInputStream input) throws IOException |
void | assertDataConsumed (String msg, byte[] data, CodedInputStream input) throws IOException |
void | assertMessageDepth (String msg, TestRecursiveMessage message, int depth) |
void | assertMessageDepth (String msg, TestRecursiveMessage message, int depth) |
void | assertReadLittleEndian32 (byte[] data, int value) throws Exception |
void | assertReadLittleEndian32 (byte[] data, int value) throws Exception |
void | assertReadLittleEndian64 (byte[] data, long value) throws Exception |
void | assertReadLittleEndian64 (byte[] data, long value) throws Exception |
void | assertReadVarint (byte[] data, long value) throws Exception |
void | assertReadVarint (byte[] data, long value) throws Exception |
void | assertReadVarintFailure (InvalidProtocolBufferException expected, byte[] data) throws Exception |
void | assertReadVarintFailure (InvalidProtocolBufferException expected, byte[] data) throws Exception |
byte[] | bytes (int... bytesAsInts) |
byte[] | bytes (int... bytesAsInts) |
void | checkSizeLimitExceeded (InvalidProtocolBufferException e) |
void | checkSizeLimitExceeded (InvalidProtocolBufferException e) |
TestRecursiveMessage | makeRecursiveMessage (int depth) |
TestRecursiveMessage | makeRecursiveMessage (int depth) |
Static Private Member Functions | |
static byte[] | getBigSerializedMessage () |
static byte[] | getBigSerializedMessage () |
Static Private Attributes | |
static final int | DEFAULT_BLOCK_SIZE = 4096 |
Unit test for CodedInputStream.
Unit test for CodedInputStream.
Definition at line 55 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 180 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 181 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 624 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 649 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawLittleEndian32() and checks that the result matches the given value.
Definition at line 307 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawLittleEndian32() and checks that the result matches the given value.
Definition at line 317 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawLittleEndian64() and checks that the result matches the given value.
Definition at line 322 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawLittleEndian64() and checks that the result matches the given value.
Definition at line 332 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawVarint32() and readRawVarint64() and checks that the result matches the given value.
Definition at line 190 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawVarint32() and readRawVarint64() and checks that the result matches the given value.
Definition at line 191 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawVarint32() and readRawVarint64() and expects them to fail with an InvalidProtocolBufferException whose description matches the given one.
Definition at line 226 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Parses the given bytes using readRawVarint32() and readRawVarint64() and expects them to fail with an InvalidProtocolBufferException whose description matches the given one.
Definition at line 229 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Helper to construct a byte array from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision.
Definition at line 133 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Helper to construct a byte array from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision.
Definition at line 134 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 660 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 687 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlinestaticprivate |
Definition at line 581 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlinestaticprivate |
Definition at line 606 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 616 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inlineprivate |
Definition at line 641 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1145 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1229 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 759 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 793 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test decodeZigZag32() and decodeZigZag64().
Definition at line 345 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test decodeZigZag32() and decodeZigZag64().
Definition at line 357 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1358 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1343 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 921 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 965 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 746 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 779 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1195 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1200 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1288 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 634 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 660 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test we can do messages that are up to CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).
IOException |
Definition at line 544 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test we can do messages that are up to CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).
IOException |
Definition at line 568 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test there is an exception if a message exceeds CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).
IOException |
Definition at line 561 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test there is an exception if a message exceeds CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).
IOException |
Definition at line 586 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 939 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 984 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1027 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1075 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1068 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1117 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 908 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 951 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 484 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 504 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1003 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1050 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 979 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1025 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests readRawLittleEndian32() and readRawLittleEndian64().
Definition at line 334 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests readRawLittleEndian32() and readRawLittleEndian64().
Definition at line 345 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 515 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 538 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 805 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 842 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests that if we readString invalid UTF-8 bytes, no exception is thrown. Instead, the invalid bytes are replaced with the Unicode "replacement character" U+FFFD.
Definition at line 861 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests that if we readString invalid UTF-8 bytes, no exception is thrown. Instead, the invalid bytes are replaced with the Unicode "replacement character" U+FFFD.
Definition at line 900 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 831 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 869 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests that if we readStringRequireUtf8 invalid UTF-8 bytes, an InvalidProtocolBufferException is thrown.
Definition at line 884 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests that if we readStringRequireUtf8 invalid UTF-8 bytes, an InvalidProtocolBufferException is thrown.
Definition at line 924 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests readRawVarint32() and readRawVarint64().
Definition at line 255 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests readRawVarint32() and readRawVarint64().
Definition at line 265 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests reading and parsing a whole message with every field type.
Definition at line 368 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests reading and parsing a whole message with every field type.
Definition at line 381 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 711 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 743 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 679 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 710 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 664 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 694 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 786 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 822 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 462 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 480 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1163 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1248 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1177 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1263 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Skipping a huge blob should not allocate excessive memory, so there should be no limit
Definition at line 479 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Skipping a huge blob should not allocate excessive memory, so there should be no limit
Definition at line 498 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1191 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Definition at line 1278 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that calling skipRawBytes (when not merging a message) actually skips from the underlying inputstream, regardless of the buffer size used.
Definition at line 453 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that calling skipRawBytes (when not merging a message) actually skips from the underlying inputstream, regardless of the buffer size used.
Definition at line 470 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that a bug in skipRawBytes() has been fixed: if the skip skips exactly up to a limit, this should not break things.
Definition at line 418 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that a bug in skipRawBytes() has been fixed: if the skip skips exactly up to a limit, this should not break things.
Definition at line 433 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that a bug in skipRawBytes() has been fixed: if the skip skips past the end of a buffer with a limit that has been set past the end of that buffer, this should not break things.
Definition at line 433 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Test that a bug in skipRawBytes() has been fixed: if the skip skips past the end of a buffer with a limit that has been set past the end of that buffer, this should not break things.
Definition at line 449 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests skipField().
Definition at line 384 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
inline |
Tests skipField().
Definition at line 398 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.
|
staticprivate |
Definition at line 57 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.