Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.CodedInputStreamTest Class Reference
Inheritance diagram for com.google.protobuf.CodedInputStreamTest:
Inheritance graph
[legend]

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
 

Detailed Description

Unit test for CodedInputStream.

Author
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

Unit test for CodedInputStream.

Definition at line 55 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

Member Function Documentation

◆ assertDataConsumed() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertDataConsumed ( String  msg,
byte[]  data,
CodedInputStream  input 
) throws IOException
inlineprivate

◆ assertDataConsumed() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertDataConsumed ( String  msg,
byte[]  data,
CodedInputStream  input 
) throws IOException
inlineprivate

◆ assertMessageDepth() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertMessageDepth ( String  msg,
TestRecursiveMessage  message,
int  depth 
)
inlineprivate

◆ assertMessageDepth() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertMessageDepth ( String  msg,
TestRecursiveMessage  message,
int  depth 
)
inlineprivate

◆ assertReadLittleEndian32() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertReadLittleEndian32 ( byte[]  data,
int  value 
) throws Exception
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.

◆ assertReadLittleEndian32() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertReadLittleEndian32 ( byte[]  data,
int  value 
) throws Exception
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.

◆ assertReadLittleEndian64() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertReadLittleEndian64 ( byte[]  data,
long  value 
) throws Exception
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.

◆ assertReadLittleEndian64() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertReadLittleEndian64 ( byte[]  data,
long  value 
) throws Exception
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.

◆ assertReadVarint() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertReadVarint ( byte[]  data,
long  value 
) throws Exception
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.

◆ assertReadVarint() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertReadVarint ( byte[]  data,
long  value 
) throws Exception
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.

◆ assertReadVarintFailure() [1/2]

void com.google.protobuf.CodedInputStreamTest.assertReadVarintFailure ( InvalidProtocolBufferException  expected,
byte[]  data 
) throws Exception
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.

◆ assertReadVarintFailure() [2/2]

void com.google.protobuf.CodedInputStreamTest.assertReadVarintFailure ( InvalidProtocolBufferException  expected,
byte[]  data 
) throws Exception
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.

◆ bytes() [1/2]

byte [] com.google.protobuf.CodedInputStreamTest.bytes ( int...  bytesAsInts)
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.

◆ bytes() [2/2]

byte [] com.google.protobuf.CodedInputStreamTest.bytes ( int...  bytesAsInts)
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.

◆ checkSizeLimitExceeded() [1/2]

void com.google.protobuf.CodedInputStreamTest.checkSizeLimitExceeded ( InvalidProtocolBufferException  e)
inlineprivate

◆ checkSizeLimitExceeded() [2/2]

void com.google.protobuf.CodedInputStreamTest.checkSizeLimitExceeded ( InvalidProtocolBufferException  e)
inlineprivate

◆ getBigSerializedMessage() [1/2]

static byte [] com.google.protobuf.CodedInputStreamTest.getBigSerializedMessage ( )
inlinestaticprivate

◆ getBigSerializedMessage() [2/2]

static byte [] com.google.protobuf.CodedInputStreamTest.getBigSerializedMessage ( )
inlinestaticprivate

◆ makeRecursiveMessage() [1/2]

TestRecursiveMessage com.google.protobuf.CodedInputStreamTest.makeRecursiveMessage ( int  depth)
inlineprivate

◆ makeRecursiveMessage() [2/2]

TestRecursiveMessage com.google.protobuf.CodedInputStreamTest.makeRecursiveMessage ( int  depth)
inlineprivate

◆ testCompatibleTypes() [1/2]

void com.google.protobuf.CodedInputStreamTest.testCompatibleTypes ( ) throws Exception
inline

◆ testCompatibleTypes() [2/2]

void com.google.protobuf.CodedInputStreamTest.testCompatibleTypes ( ) throws Exception
inline

◆ testCurrentLimitExceeded() [1/2]

void com.google.protobuf.CodedInputStreamTest.testCurrentLimitExceeded ( ) throws Exception
inline

◆ testCurrentLimitExceeded() [2/2]

void com.google.protobuf.CodedInputStreamTest.testCurrentLimitExceeded ( ) throws Exception
inline

◆ testDecodeZigZag() [1/2]

void com.google.protobuf.CodedInputStreamTest.testDecodeZigZag ( ) throws Exception
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.

◆ testDecodeZigZag() [2/2]

void com.google.protobuf.CodedInputStreamTest.testDecodeZigZag ( ) throws Exception
inline

Test decodeZigZag32() and decodeZigZag64().

Definition at line 357 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testInvalidInputYieldsInvalidProtocolBufferException_readBytes()

void com.google.protobuf.CodedInputStreamTest.testInvalidInputYieldsInvalidProtocolBufferException_readBytes ( ) throws Exception
inline

◆ testInvalidInputYieldsInvalidProtocolBufferException_readTag()

void com.google.protobuf.CodedInputStreamTest.testInvalidInputYieldsInvalidProtocolBufferException_readTag ( ) throws Exception
inline

◆ testInvalidTag() [1/2]

void com.google.protobuf.CodedInputStreamTest.testInvalidTag ( ) throws Exception
inline

◆ testInvalidTag() [2/2]

void com.google.protobuf.CodedInputStreamTest.testInvalidTag ( ) throws Exception
inline

◆ testIsAtEnd() [1/2]

void com.google.protobuf.CodedInputStreamTest.testIsAtEnd ( ) throws Exception
inline

◆ testIsAtEnd() [2/2]

void com.google.protobuf.CodedInputStreamTest.testIsAtEnd ( ) throws Exception
inline

◆ testIterableByteBufferInputStreamReadBytesWithAlias()

void com.google.protobuf.CodedInputStreamTest.testIterableByteBufferInputStreamReadBytesWithAlias ( ) throws Exception
inline

◆ testMaliciousInputStream() [1/2]

void com.google.protobuf.CodedInputStreamTest.testMaliciousInputStream ( ) throws Exception
inline

◆ testMaliciousInputStream() [2/2]

void com.google.protobuf.CodedInputStreamTest.testMaliciousInputStream ( ) throws Exception
inline

◆ testMaliciousRecursion() [1/2]

void com.google.protobuf.CodedInputStreamTest.testMaliciousRecursion ( ) throws Exception
inline

◆ testMaliciousRecursion() [2/2]

void com.google.protobuf.CodedInputStreamTest.testMaliciousRecursion ( ) throws Exception
inline

◆ testParseMessagesCloseTo2G() [1/2]

void com.google.protobuf.CodedInputStreamTest.testParseMessagesCloseTo2G ( ) throws IOException
inline

Test we can do messages that are up to CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).

Exceptions
IOException

Definition at line 544 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testParseMessagesCloseTo2G() [2/2]

void com.google.protobuf.CodedInputStreamTest.testParseMessagesCloseTo2G ( ) throws IOException
inline

Test we can do messages that are up to CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).

Exceptions
IOException

Definition at line 568 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testParseMessagesOver2G() [1/2]

void com.google.protobuf.CodedInputStreamTest.testParseMessagesOver2G ( ) throws IOException
inline

Test there is an exception if a message exceeds CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).

Exceptions
IOException

Definition at line 561 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testParseMessagesOver2G() [2/2]

void com.google.protobuf.CodedInputStreamTest.testParseMessagesOver2G ( ) throws IOException
inline

Test there is an exception if a message exceeds CodedInputStream::DEFAULT_SIZE_LIMIT in size (2G or Integer::MAX_SIZE).

Exceptions
IOException

Definition at line 586 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testReadByteArray() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteArray ( ) throws Exception
inline

◆ testReadByteArray() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteArray ( ) throws Exception
inline

◆ testReadByteBuffer() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteBuffer ( ) throws Exception
inline

◆ testReadByteBuffer() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteBuffer ( ) throws Exception
inline

◆ testReadByteBufferAliasing() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteBufferAliasing ( ) throws Exception
inline

◆ testReadByteBufferAliasing() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadByteBufferAliasing ( ) throws Exception
inline

◆ testReadFromSlice() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadFromSlice ( ) throws Exception
inline

◆ testReadFromSlice() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadFromSlice ( ) throws Exception
inline

◆ testReadHugeBlob() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadHugeBlob ( ) throws Exception
inline

◆ testReadHugeBlob() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadHugeBlob ( ) throws Exception
inline

◆ testReadLargeByteArrayFromInputStream() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadLargeByteArrayFromInputStream ( ) throws Exception
inline

◆ testReadLargeByteArrayFromInputStream() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadLargeByteArrayFromInputStream ( ) throws Exception
inline

◆ testReadLargeByteStringFromInputStream() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadLargeByteStringFromInputStream ( ) throws Exception
inline

◆ testReadLargeByteStringFromInputStream() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadLargeByteStringFromInputStream ( ) throws Exception
inline

◆ testReadLittleEndian() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadLittleEndian ( ) throws Exception
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.

◆ testReadLittleEndian() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadLittleEndian ( ) throws Exception
inline

Tests readRawLittleEndian32() and readRawLittleEndian64().

Definition at line 345 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testReadMaliciouslyLargeBlob() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadMaliciouslyLargeBlob ( ) throws Exception
inline

◆ testReadMaliciouslyLargeBlob() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadMaliciouslyLargeBlob ( ) throws Exception
inline

◆ testReadString() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadString ( ) throws Exception
inline

◆ testReadString() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadString ( ) throws Exception
inline

◆ testReadStringInvalidUtf8() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringInvalidUtf8 ( ) throws Exception
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.

◆ testReadStringInvalidUtf8() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringInvalidUtf8 ( ) throws Exception
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.

◆ testReadStringRequireUtf8() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringRequireUtf8 ( ) throws Exception
inline

◆ testReadStringRequireUtf8() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringRequireUtf8 ( ) throws Exception
inline

◆ testReadStringRequireUtf8InvalidUtf8() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringRequireUtf8InvalidUtf8 ( ) throws Exception
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.

◆ testReadStringRequireUtf8InvalidUtf8() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadStringRequireUtf8InvalidUtf8 ( ) throws Exception
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.

◆ testReadVarint() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadVarint ( ) throws Exception
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.

◆ testReadVarint() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadVarint ( ) throws Exception
inline

Tests readRawVarint32() and readRawVarint64().

Definition at line 265 of file protobuf/java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java.

◆ testReadWholeMessage() [1/2]

void com.google.protobuf.CodedInputStreamTest.testReadWholeMessage ( ) throws Exception
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.

◆ testReadWholeMessage() [2/2]

void com.google.protobuf.CodedInputStreamTest.testReadWholeMessage ( ) throws Exception
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.

◆ testRefillBufferWithCorrectSize() [1/2]

void com.google.protobuf.CodedInputStreamTest.testRefillBufferWithCorrectSize ( ) throws Exception
inline

◆ testRefillBufferWithCorrectSize() [2/2]

void com.google.protobuf.CodedInputStreamTest.testRefillBufferWithCorrectSize ( ) throws Exception
inline

◆ testResetSizeCounter() [1/2]

void com.google.protobuf.CodedInputStreamTest.testResetSizeCounter ( ) throws Exception
inline

◆ testResetSizeCounter() [2/2]

void com.google.protobuf.CodedInputStreamTest.testResetSizeCounter ( ) throws Exception
inline

◆ testSizeLimit() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSizeLimit ( ) throws Exception
inline

◆ testSizeLimit() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSizeLimit ( ) throws Exception
inline

◆ testSizeLimitMultipleMessages() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSizeLimitMultipleMessages ( ) throws Exception
inline

◆ testSizeLimitMultipleMessages() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSizeLimitMultipleMessages ( ) throws Exception
inline

◆ testSkipHugeBlob() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipHugeBlob ( ) throws Exception
inline

◆ testSkipHugeBlob() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipHugeBlob ( ) throws Exception
inline

◆ testSkipInvalidVarint_FastPath() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipInvalidVarint_FastPath ( ) throws Exception
inline

◆ testSkipInvalidVarint_FastPath() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipInvalidVarint_FastPath ( ) throws Exception
inline

◆ testSkipInvalidVarint_SlowPath() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipInvalidVarint_SlowPath ( ) throws Exception
inline

◆ testSkipInvalidVarint_SlowPath() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipInvalidVarint_SlowPath ( ) throws Exception
inline

◆ testSkipMaliciouslyHugeBlob() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipMaliciouslyHugeBlob ( ) throws Exception
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.

◆ testSkipMaliciouslyHugeBlob() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipMaliciouslyHugeBlob ( ) throws Exception
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.

◆ testSkipPastEndOfByteArrayInput() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipPastEndOfByteArrayInput ( ) throws Exception
inline

◆ testSkipPastEndOfByteArrayInput() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipPastEndOfByteArrayInput ( ) throws Exception
inline

◆ testSkipRawBytesActuallySkips() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesActuallySkips ( ) throws Exception
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.

◆ testSkipRawBytesActuallySkips() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesActuallySkips ( ) throws Exception
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.

◆ testSkipRawBytesBug() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesBug ( ) throws Exception
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.

◆ testSkipRawBytesBug() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesBug ( ) throws Exception
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.

◆ testSkipRawBytesPastEndOfBufferWithLimit() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesPastEndOfBufferWithLimit ( ) throws Exception
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.

◆ testSkipRawBytesPastEndOfBufferWithLimit() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipRawBytesPastEndOfBufferWithLimit ( ) throws Exception
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.

◆ testSkipWholeMessage() [1/2]

void com.google.protobuf.CodedInputStreamTest.testSkipWholeMessage ( ) throws Exception
inline

◆ testSkipWholeMessage() [2/2]

void com.google.protobuf.CodedInputStreamTest.testSkipWholeMessage ( ) throws Exception
inline

Member Data Documentation

◆ DEFAULT_BLOCK_SIZE

static final int com.google.protobuf.CodedInputStreamTest.DEFAULT_BLOCK_SIZE = 4096
staticprivate

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:02