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

Public Member Functions

void testAsReadOnlyByteBuffer ()
 
void testAsReadOnlyByteBufferList ()
 
void testByteAt ()
 
void testByteIterable ()
 
void testByteIterator ()
 
void testCharsetToString ()
 
void testConcat_empty ()
 
void testCopyTo_ByteArrayOffsetLength ()
 
void testCopyTo_ByteArrayOffsetLengthErrors ()
 
void testCopyTo_ByteBuffer ()
 
void testEquals ()
 
void testEqualsLiteralByteString ()
 
void testEqualsRopeByteString ()
 
void testExpectedType ()
 
void testGetTreeDepth ()
 
void testHashCode ()
 
void testIsBalanced ()
 
void testJavaSerialization () throws Exception
 
void testMarkAndReset () throws IOException
 
void testMarkSupported ()
 
void testNewCodedInput () throws IOException
 
void testNewInput () throws IOException
 
void testNewInput_skip () throws IOException
 
void testNewOutput () throws IOException
 
void testPartialHash ()
 
void testPeekCachedHashCode ()
 
void testSize ()
 
void testToByteArray ()
 
void testToString ()
 
void testToString_raisesException ()
 
void testToString_returnsCanonicalEmptyString ()
 
void testWriteTo () throws IOException
 
void testWriteToInternalShouldExposeInternalBufferToOutputStream () throws IOException
 
void testWriteToShouldExposeInternalBufferToByteOutput () throws IOException
 
void testWriteToShouldNotExposeInternalBufferToOutputStream () throws IOException
 

Protected Member Functions

String getActualClassName (Object object)
 

Private Member Functions

byte[] mungedBytes ()
 

Static Private Member Functions

static ByteString forString (String str)
 

Private Attributes

final ByteBuffer backingBuffer = ByteBuffer.wrap(BYTES.clone())
 
final ByteString testString = new NioByteString(backingBuffer)
 

Static Private Attributes

static final byte[] BYTES = ByteStringTest.getTestBytes(1234, 11337766L)
 
static final String CLASSNAME = NioByteString.class.getSimpleName()
 
static final ByteString EMPTY = new NioByteString(ByteBuffer.wrap(new byte[0]))
 
static final int EXPECTED_HASH = ByteString.wrap(BYTES).hashCode()
 

Detailed Description

Tests for NioByteString.

Definition at line 52 of file NioByteStringTest.java.

Member Function Documentation

◆ forString()

static ByteString com.google.protobuf.NioByteStringTest.forString ( String  str)
inlinestaticprivate

Definition at line 635 of file NioByteStringTest.java.

◆ getActualClassName()

String com.google.protobuf.NioByteStringTest.getActualClassName ( Object  object)
inlineprotected

Definition at line 66 of file NioByteStringTest.java.

◆ mungedBytes()

byte [] com.google.protobuf.NioByteStringTest.mungedBytes ( )
inlineprivate

Definition at line 530 of file NioByteStringTest.java.

◆ testAsReadOnlyByteBuffer()

void com.google.protobuf.NioByteStringTest.testAsReadOnlyByteBuffer ( )
inline

Definition at line 288 of file NioByteStringTest.java.

◆ testAsReadOnlyByteBufferList()

void com.google.protobuf.NioByteStringTest.testAsReadOnlyByteBufferList ( )
inline

Definition at line 299 of file NioByteStringTest.java.

◆ testByteAt()

void com.google.protobuf.NioByteStringTest.testByteAt ( )
inline

Definition at line 72 of file NioByteStringTest.java.

◆ testByteIterable()

void com.google.protobuf.NioByteStringTest.testByteIterable ( )
inline

Definition at line 97 of file NioByteStringTest.java.

◆ testByteIterator()

void com.google.protobuf.NioByteStringTest.testByteIterator ( )
inline

Definition at line 80 of file NioByteStringTest.java.

◆ testCharsetToString()

void com.google.protobuf.NioByteStringTest.testCharsetToString ( )
inline

Definition at line 439 of file NioByteStringTest.java.

◆ testConcat_empty()

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

Make sure we keep things simple when concatenating with empty. See also {}.

Definition at line 611 of file NioByteStringTest.java.

◆ testCopyTo_ByteArrayOffsetLength()

void com.google.protobuf.NioByteStringTest.testCopyTo_ByteArrayOffsetLength ( )
inline

Definition at line 120 of file NioByteStringTest.java.

◆ testCopyTo_ByteArrayOffsetLengthErrors()

void com.google.protobuf.NioByteStringTest.testCopyTo_ByteArrayOffsetLengthErrors ( )
inline

Definition at line 133 of file NioByteStringTest.java.

◆ testCopyTo_ByteBuffer()

void com.google.protobuf.NioByteStringTest.testCopyTo_ByteBuffer ( )
inline

Definition at line 193 of file NioByteStringTest.java.

◆ testEquals()

void com.google.protobuf.NioByteStringTest.testEquals ( )
inline

Definition at line 469 of file NioByteStringTest.java.

◆ testEqualsLiteralByteString()

void com.google.protobuf.NioByteStringTest.testEqualsLiteralByteString ( )
inline

Definition at line 485 of file NioByteStringTest.java.

◆ testEqualsRopeByteString()

void com.google.protobuf.NioByteStringTest.testEqualsRopeByteString ( )
inline

Definition at line 503 of file NioByteStringTest.java.

◆ testExpectedType()

void com.google.protobuf.NioByteStringTest.testExpectedType ( )
inline

Definition at line 61 of file NioByteStringTest.java.

◆ testGetTreeDepth()

void com.google.protobuf.NioByteStringTest.testGetTreeDepth ( )
inline

Definition at line 112 of file NioByteStringTest.java.

◆ testHashCode()

void com.google.protobuf.NioByteStringTest.testHashCode ( )
inline

Definition at line 537 of file NioByteStringTest.java.

◆ testIsBalanced()

void com.google.protobuf.NioByteStringTest.testIsBalanced ( )
inline

Definition at line 116 of file NioByteStringTest.java.

◆ testJavaSerialization()

void com.google.protobuf.NioByteStringTest.testJavaSerialization ( ) throws Exception
inline

Definition at line 622 of file NioByteStringTest.java.

◆ testMarkAndReset()

void com.google.protobuf.NioByteStringTest.testMarkAndReset ( ) throws IOException
inline

Definition at line 231 of file NioByteStringTest.java.

◆ testMarkSupported()

void com.google.protobuf.NioByteStringTest.testMarkSupported ( )
inline

Definition at line 226 of file NioByteStringTest.java.

◆ testNewCodedInput()

void com.google.protobuf.NioByteStringTest.testNewCodedInput ( ) throws IOException
inline

Definition at line 598 of file NioByteStringTest.java.

◆ testNewInput()

void com.google.protobuf.NioByteStringTest.testNewInput ( ) throws IOException
inline

Definition at line 562 of file NioByteStringTest.java.

◆ testNewInput_skip()

void com.google.protobuf.NioByteStringTest.testNewInput_skip ( ) throws IOException
inline

Definition at line 576 of file NioByteStringTest.java.

◆ testNewOutput()

void com.google.protobuf.NioByteStringTest.testNewOutput ( ) throws IOException
inline

Definition at line 411 of file NioByteStringTest.java.

◆ testPartialHash()

void com.google.protobuf.NioByteStringTest.testPartialHash ( )
inline

Definition at line 555 of file NioByteStringTest.java.

◆ testPeekCachedHashCode()

void com.google.protobuf.NioByteStringTest.testPeekCachedHashCode ( )
inline

Definition at line 542 of file NioByteStringTest.java.

◆ testSize()

void com.google.protobuf.NioByteStringTest.testSize ( )
inline

Definition at line 108 of file NioByteStringTest.java.

◆ testToByteArray()

void com.google.protobuf.NioByteStringTest.testToByteArray ( )
inline

Definition at line 316 of file NioByteStringTest.java.

◆ testToString()

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

Definition at line 432 of file NioByteStringTest.java.

◆ testToString_raisesException()

void com.google.protobuf.NioByteStringTest.testToString_raisesException ( )
inline

Definition at line 453 of file NioByteStringTest.java.

◆ testToString_returnsCanonicalEmptyString()

void com.google.protobuf.NioByteStringTest.testToString_returnsCanonicalEmptyString ( )
inline

Definition at line 446 of file NioByteStringTest.java.

◆ testWriteTo()

void com.google.protobuf.NioByteStringTest.testWriteTo ( ) throws IOException
inline

Definition at line 323 of file NioByteStringTest.java.

◆ testWriteToInternalShouldExposeInternalBufferToOutputStream()

void com.google.protobuf.NioByteStringTest.testWriteToInternalShouldExposeInternalBufferToOutputStream ( ) throws IOException
inline

Definition at line 353 of file NioByteStringTest.java.

◆ testWriteToShouldExposeInternalBufferToByteOutput()

void com.google.protobuf.NioByteStringTest.testWriteToShouldExposeInternalBufferToByteOutput ( ) throws IOException
inline

Definition at line 374 of file NioByteStringTest.java.

◆ testWriteToShouldNotExposeInternalBufferToOutputStream()

void com.google.protobuf.NioByteStringTest.testWriteToShouldNotExposeInternalBufferToOutputStream ( ) throws IOException
inline

Definition at line 332 of file NioByteStringTest.java.

Member Data Documentation

◆ backingBuffer

final ByteBuffer com.google.protobuf.NioByteStringTest.backingBuffer = ByteBuffer.wrap(BYTES.clone())
private

Definition at line 58 of file NioByteStringTest.java.

◆ BYTES

final byte [] com.google.protobuf.NioByteStringTest.BYTES = ByteStringTest.getTestBytes(1234, 11337766L)
staticprivate

Definition at line 55 of file NioByteStringTest.java.

◆ CLASSNAME

final String com.google.protobuf.NioByteStringTest.CLASSNAME = NioByteString.class.getSimpleName()
staticprivate

Definition at line 54 of file NioByteStringTest.java.

◆ EMPTY

final ByteString com.google.protobuf.NioByteStringTest.EMPTY = new NioByteString(ByteBuffer.wrap(new byte[0]))
staticprivate

Definition at line 53 of file NioByteStringTest.java.

◆ EXPECTED_HASH

final int com.google.protobuf.NioByteStringTest.EXPECTED_HASH = ByteString.wrap(BYTES).hashCode()
staticprivate

Definition at line 56 of file NioByteStringTest.java.

◆ testString

final ByteString com.google.protobuf.NioByteStringTest.testString = new NioByteString(backingBuffer)
private

Definition at line 59 of file NioByteStringTest.java.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:07