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

Classes

class  AvailableStream
 
class  EvilInputStream
 
class  EvilOutputStream
 
class  FailStream
 
class  ReluctantStream
 

Public Member Functions

void testByteArrayCopier () throws Exception
 
void testByteArrayCopier () throws Exception
 
void testCompare_byteStringsSortLexicographically () throws Exception
 
void testCompare_byteStringsSortLexicographically () throws Exception
 
void testCompare_equalByteStrings_compareEqual () throws Exception
 
void testCompare_equalByteStrings_compareEqual () throws Exception
 
void testCompare_interpretsByteValuesAsUnsigned () throws Exception
 
void testCompare_interpretsByteValuesAsUnsigned () throws Exception
 
void testCompositeSubstring ()
 
void testCompositeSubstring ()
 
void testConcat ()
 
void testConcat ()
 
void testConcat_empty ()
 
void testConcat_empty ()
 
void testCopyFrom_ByteBuffer ()
 
void testCopyFrom_ByteBuffer ()
 
void testCopyFrom_ByteBufferSize ()
 
void testCopyFrom_ByteBufferSize ()
 
void testCopyFrom_Bytes ()
 
void testCopyFrom_Bytes ()
 
void testCopyFrom_BytesOffsetSize ()
 
void testCopyFrom_BytesOffsetSize ()
 
void testCopyFrom_Iterable ()
 
void testCopyFrom_Iterable ()
 
void testCopyFrom_LengthTooBig ()
 
void testCopyFrom_LengthTooBig ()
 
void testCopyFrom_StringEncoding ()
 
void testCopyFrom_StringEncoding ()
 
void testCopyFrom_Utf8 ()
 
void testCopyFrom_Utf8 ()
 
void testCopyFromList ()
 
void testCopyFromList ()
 
void testCopyTo_TargetOffset ()
 
void testCopyTo_TargetOffset ()
 
void testEndsWith ()
 
void testEndsWith ()
 
void testNewCodedBuilder () throws IOException
 
void testNewCodedBuilder () throws IOException
 
void testNewOutput_ArrayWrite ()
 
void testNewOutput_ArrayWrite ()
 
void testNewOutput_InitialCapacity () throws IOException
 
void testNewOutput_InitialCapacity () throws IOException
 
void testNewOutput_Mixed ()
 
void testNewOutput_Mixed ()
 
void testNewOutput_Mutating () throws IOException
 
void testNewOutput_Mutating () throws IOException
 
void testNewOutput_WriteChar ()
 
void testNewOutput_WriteChar ()
 
void testNewOutputEmpty ()
 
void testNewOutputEmpty ()
 
void testReadFrom_available () throws IOException
 
void testReadFrom_available () throws IOException
 
void testReadFrom_byteBoundaries () throws IOException
 
void testReadFrom_byteBoundaries () throws IOException
 
void testReadFrom_emptyStream () throws IOException
 
void testReadFrom_emptyStream () throws IOException
 
void testReadFrom_IOExceptions ()
 
void testReadFrom_IOExceptions ()
 
void testReadFrom_largeStream () throws IOException
 
void testReadFrom_largeStream () throws IOException
 
void testReadFrom_mediumStream () throws IOException
 
void testReadFrom_mediumStream () throws IOException
 
void testReadFrom_mutating () throws IOException
 
void testReadFrom_mutating () throws IOException
 
void testReadFrom_reluctantStream () throws IOException
 
void testReadFrom_reluctantStream () throws IOException
 
void testReadFrom_smallStream () throws IOException
 
void testReadFrom_smallStream () throws IOException
 
void testStartsWith ()
 
void testStartsWith ()
 
void testSubstring_BeginIndex ()
 
void testSubstring_BeginIndex ()
 
void testSubstringParity ()
 
void testSubstringParity ()
 
void testToString ()
 
void testToString_long ()
 
void testToStringUtf8 ()
 
void testToStringUtf8 ()
 
void testWriteToOutputStream () throws Exception
 
void testWriteToOutputStream () throws Exception
 

Private Member Functions

void assertReadFrom (byte[] bytes) throws IOException
 
void assertReadFrom (byte[] bytes) throws IOException
 
void assertReadFromReluctantStream (byte[] bytes, int chunkSize) throws IOException
 
void assertReadFromReluctantStream (byte[] bytes, int chunkSize) throws IOException
 
byte[] getTestBytes ()
 
byte[] getTestBytes ()
 
byte[] getTestBytes (int size)
 
byte[] getTestBytes (int size)
 
boolean isArray (byte[] left, byte[] right)
 
boolean isArray (byte[] left, byte[] right)
 
boolean isArrayRange (byte[] left, byte[] right, int rightOffset, int length)
 
boolean isArrayRange (byte[] left, byte[] right, int rightOffset, int length)
 
byte[] substringUsingWriteTo (ByteString data, int offset, int length) throws IOException
 
byte[] substringUsingWriteTo (ByteString data, int offset, int length) throws IOException
 

Static Private Attributes

static final Charset UTF_16 = Charset.forName("UTF-16")
 

Detailed Description

Test methods with implementations in ByteString, plus do some top-level "integration" tests.

Author
carla.nosp@m.nton.nosp@m.@goog.nosp@m.le.c.nosp@m.om (Carl Haverl)

Test methods with implementations in ByteString, plus do some top-level "integration" tests.

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

Member Function Documentation

◆ assertReadFrom() [1/2]

void com.google.protobuf.ByteStringTest.assertReadFrom ( byte[]  bytes) throws IOException
inlineprivate

◆ assertReadFrom() [2/2]

void com.google.protobuf.ByteStringTest.assertReadFrom ( byte[]  bytes) throws IOException
inlineprivate

◆ assertReadFromReluctantStream() [1/2]

void com.google.protobuf.ByteStringTest.assertReadFromReluctantStream ( byte[]  bytes,
int  chunkSize 
) throws IOException
inlineprivate

◆ assertReadFromReluctantStream() [2/2]

void com.google.protobuf.ByteStringTest.assertReadFromReluctantStream ( byte[]  bytes,
int  chunkSize 
) throws IOException
inlineprivate

◆ getTestBytes() [1/4]

byte [] com.google.protobuf.ByteStringTest.getTestBytes ( )
inlineprivate

◆ getTestBytes() [2/4]

byte [] com.google.protobuf.ByteStringTest.getTestBytes ( )
inlineprivate

◆ getTestBytes() [3/4]

byte [] com.google.protobuf.ByteStringTest.getTestBytes ( int  size)
inlineprivate

◆ getTestBytes() [4/4]

byte [] com.google.protobuf.ByteStringTest.getTestBytes ( int  size)
inlineprivate

◆ isArray() [1/2]

boolean com.google.protobuf.ByteStringTest.isArray ( byte[]  left,
byte[]  right 
)
inlineprivate

◆ isArray() [2/2]

boolean com.google.protobuf.ByteStringTest.isArray ( byte[]  left,
byte[]  right 
)
inlineprivate

◆ isArrayRange() [1/2]

boolean com.google.protobuf.ByteStringTest.isArrayRange ( byte[]  left,
byte[]  right,
int  rightOffset,
int  length 
)
inlineprivate

◆ isArrayRange() [2/2]

boolean com.google.protobuf.ByteStringTest.isArrayRange ( byte[]  left,
byte[]  right,
int  rightOffset,
int  length 
)
inlineprivate

◆ substringUsingWriteTo() [1/2]

byte [] com.google.protobuf.ByteStringTest.substringUsingWriteTo ( ByteString  data,
int  offset,
int  length 
) throws IOException
inlineprivate

◆ substringUsingWriteTo() [2/2]

byte [] com.google.protobuf.ByteStringTest.substringUsingWriteTo ( ByteString  data,
int  offset,
int  length 
) throws IOException
inlineprivate

◆ testByteArrayCopier() [1/2]

void com.google.protobuf.ByteStringTest.testByteArrayCopier ( ) throws Exception
inline

Tests ByteString uses Arrays based byte copier when running under Hotstop VM.

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

◆ testByteArrayCopier() [2/2]

void com.google.protobuf.ByteStringTest.testByteArrayCopier ( ) throws Exception
inline

Tests ByteString uses Arrays based byte copier when running under Hotstop VM.

Definition at line 933 of file protobuf/java/core/src/test/java/com/google/protobuf/ByteStringTest.java.

◆ testCompare_byteStringsSortLexicographically() [1/2]

void com.google.protobuf.ByteStringTest.testCompare_byteStringsSortLexicographically ( ) throws Exception
inline

◆ testCompare_byteStringsSortLexicographically() [2/2]

void com.google.protobuf.ByteStringTest.testCompare_byteStringsSortLexicographically ( ) throws Exception
inline

◆ testCompare_equalByteStrings_compareEqual() [1/2]

void com.google.protobuf.ByteStringTest.testCompare_equalByteStrings_compareEqual ( ) throws Exception
inline

◆ testCompare_equalByteStrings_compareEqual() [2/2]

void com.google.protobuf.ByteStringTest.testCompare_equalByteStrings_compareEqual ( ) throws Exception
inline

◆ testCompare_interpretsByteValuesAsUnsigned() [1/2]

void com.google.protobuf.ByteStringTest.testCompare_interpretsByteValuesAsUnsigned ( ) throws Exception
inline

◆ testCompare_interpretsByteValuesAsUnsigned() [2/2]

void com.google.protobuf.ByteStringTest.testCompare_interpretsByteValuesAsUnsigned ( ) throws Exception
inline

◆ testCompositeSubstring() [1/2]

void com.google.protobuf.ByteStringTest.testCompositeSubstring ( )
inline

◆ testCompositeSubstring() [2/2]

void com.google.protobuf.ByteStringTest.testCompositeSubstring ( )
inline

◆ testConcat() [1/2]

void com.google.protobuf.ByteStringTest.testConcat ( )
inline

◆ testConcat() [2/2]

void com.google.protobuf.ByteStringTest.testConcat ( )
inline

◆ testConcat_empty() [1/2]

void com.google.protobuf.ByteStringTest.testConcat_empty ( )
inline

Test the Rope implementation can deal with Empty nodes, even though we guard against them. See also LiteralByteStringTest#testConcat_empty().

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

◆ testConcat_empty() [2/2]

void com.google.protobuf.ByteStringTest.testConcat_empty ( )
inline

Test the Rope implementation can deal with Empty nodes, even though we guard against them. See also LiteralByteStringTest#testConcat_empty().

Definition at line 781 of file protobuf/java/core/src/test/java/com/google/protobuf/ByteStringTest.java.

◆ testCopyFrom_ByteBuffer() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_ByteBuffer ( )
inline

◆ testCopyFrom_ByteBuffer() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_ByteBuffer ( )
inline

◆ testCopyFrom_ByteBufferSize() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_ByteBufferSize ( )
inline

◆ testCopyFrom_ByteBufferSize() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_ByteBufferSize ( )
inline

◆ testCopyFrom_Bytes() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Bytes ( )
inline

◆ testCopyFrom_Bytes() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Bytes ( )
inline

◆ testCopyFrom_BytesOffsetSize() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_BytesOffsetSize ( )
inline

◆ testCopyFrom_BytesOffsetSize() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_BytesOffsetSize ( )
inline

◆ testCopyFrom_Iterable() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Iterable ( )
inline

◆ testCopyFrom_Iterable() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Iterable ( )
inline

◆ testCopyFrom_LengthTooBig() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_LengthTooBig ( )
inline

◆ testCopyFrom_LengthTooBig() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_LengthTooBig ( )
inline

◆ testCopyFrom_StringEncoding() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_StringEncoding ( )
inline

◆ testCopyFrom_StringEncoding() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_StringEncoding ( )
inline

◆ testCopyFrom_Utf8() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Utf8 ( )
inline

◆ testCopyFrom_Utf8() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFrom_Utf8 ( )
inline

◆ testCopyFromList() [1/2]

void com.google.protobuf.ByteStringTest.testCopyFromList ( )
inline

◆ testCopyFromList() [2/2]

void com.google.protobuf.ByteStringTest.testCopyFromList ( )
inline

◆ testCopyTo_TargetOffset() [1/2]

void com.google.protobuf.ByteStringTest.testCopyTo_TargetOffset ( )
inline

◆ testCopyTo_TargetOffset() [2/2]

void com.google.protobuf.ByteStringTest.testCopyTo_TargetOffset ( )
inline

◆ testEndsWith() [1/2]

void com.google.protobuf.ByteStringTest.testEndsWith ( )
inline

◆ testEndsWith() [2/2]

void com.google.protobuf.ByteStringTest.testEndsWith ( )
inline

◆ testNewCodedBuilder() [1/2]

void com.google.protobuf.ByteStringTest.testNewCodedBuilder ( ) throws IOException
inline

◆ testNewCodedBuilder() [2/2]

void com.google.protobuf.ByteStringTest.testNewCodedBuilder ( ) throws IOException
inline

◆ testNewOutput_ArrayWrite() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutput_ArrayWrite ( )
inline

◆ testNewOutput_ArrayWrite() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutput_ArrayWrite ( )
inline

◆ testNewOutput_InitialCapacity() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutput_InitialCapacity ( ) throws IOException
inline

◆ testNewOutput_InitialCapacity() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutput_InitialCapacity ( ) throws IOException
inline

◆ testNewOutput_Mixed() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutput_Mixed ( )
inline

◆ testNewOutput_Mixed() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutput_Mixed ( )
inline

◆ testNewOutput_Mutating() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutput_Mutating ( ) throws IOException
inline

◆ testNewOutput_Mutating() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutput_Mutating ( ) throws IOException
inline

◆ testNewOutput_WriteChar() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutput_WriteChar ( )
inline

◆ testNewOutput_WriteChar() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutput_WriteChar ( )
inline

◆ testNewOutputEmpty() [1/2]

void com.google.protobuf.ByteStringTest.testNewOutputEmpty ( )
inline

◆ testNewOutputEmpty() [2/2]

void com.google.protobuf.ByteStringTest.testNewOutputEmpty ( )
inline

◆ testReadFrom_available() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_available ( ) throws IOException
inline

◆ testReadFrom_available() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_available ( ) throws IOException
inline

◆ testReadFrom_byteBoundaries() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_byteBoundaries ( ) throws IOException
inline

◆ testReadFrom_byteBoundaries() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_byteBoundaries ( ) throws IOException
inline

◆ testReadFrom_emptyStream() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_emptyStream ( ) throws IOException
inline

◆ testReadFrom_emptyStream() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_emptyStream ( ) throws IOException
inline

◆ testReadFrom_IOExceptions() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_IOExceptions ( )
inline

◆ testReadFrom_IOExceptions() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_IOExceptions ( )
inline

◆ testReadFrom_largeStream() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_largeStream ( ) throws IOException
inline

◆ testReadFrom_largeStream() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_largeStream ( ) throws IOException
inline

◆ testReadFrom_mediumStream() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_mediumStream ( ) throws IOException
inline

◆ testReadFrom_mediumStream() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_mediumStream ( ) throws IOException
inline

◆ testReadFrom_mutating() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_mutating ( ) throws IOException
inline

◆ testReadFrom_mutating() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_mutating ( ) throws IOException
inline

◆ testReadFrom_reluctantStream() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_reluctantStream ( ) throws IOException
inline

◆ testReadFrom_reluctantStream() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_reluctantStream ( ) throws IOException
inline

◆ testReadFrom_smallStream() [1/2]

void com.google.protobuf.ByteStringTest.testReadFrom_smallStream ( ) throws IOException
inline

◆ testReadFrom_smallStream() [2/2]

void com.google.protobuf.ByteStringTest.testReadFrom_smallStream ( ) throws IOException
inline

◆ testStartsWith() [1/2]

void com.google.protobuf.ByteStringTest.testStartsWith ( )
inline

◆ testStartsWith() [2/2]

void com.google.protobuf.ByteStringTest.testStartsWith ( )
inline

◆ testSubstring_BeginIndex() [1/2]

void com.google.protobuf.ByteStringTest.testSubstring_BeginIndex ( )
inline

◆ testSubstring_BeginIndex() [2/2]

void com.google.protobuf.ByteStringTest.testSubstring_BeginIndex ( )
inline

◆ testSubstringParity() [1/2]

void com.google.protobuf.ByteStringTest.testSubstringParity ( )
inline

◆ testSubstringParity() [2/2]

void com.google.protobuf.ByteStringTest.testSubstringParity ( )
inline

◆ testToString()

void com.google.protobuf.ByteStringTest.testToString ( )
inline

◆ testToString_long()

void com.google.protobuf.ByteStringTest.testToString_long ( )
inline

◆ testToStringUtf8() [1/2]

void com.google.protobuf.ByteStringTest.testToStringUtf8 ( )
inline

◆ testToStringUtf8() [2/2]

void com.google.protobuf.ByteStringTest.testToStringUtf8 ( )
inline

◆ testWriteToOutputStream() [1/2]

void com.google.protobuf.ByteStringTest.testWriteToOutputStream ( ) throws Exception
inline

◆ testWriteToOutputStream() [2/2]

void com.google.protobuf.ByteStringTest.testWriteToOutputStream ( ) throws Exception
inline

Member Data Documentation

◆ UTF_16

static final Charset com.google.protobuf.ByteStringTest.UTF_16 = Charset.forName("UTF-16")
staticprivate

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


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