Class FastBufferWriterTests
Inheritance
FastBufferWriterTests
Syntax
public class FastBufferWriterTests : BaseFastBufferReaderWriterTest
Methods
RunFixedStringTest<T>(T, Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void RunFixedStringTest<T>(T fixedStringValue, int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
where T : struct, INativeList<byte>, IUTF8Bytes
Parameters
Type Parameters
RunTypeArrayTest<T>(T[])
Declaration
protected override void RunTypeArrayTest<T>(T[] valueToTest)
where T : struct
Parameters
Type |
Name |
Description |
T[] |
valueToTest |
|
Type Parameters
Overrides
Unity.Netcode.EditorTests.BaseFastBufferReaderWriterTest.RunTypeArrayTest<T>(T[])
RunTypeArrayTestSafe<T>(T[])
Declaration
protected override void RunTypeArrayTestSafe<T>(T[] valueToTest)
where T : struct
Parameters
Type |
Name |
Description |
T[] |
valueToTest |
|
Type Parameters
Overrides
Unity.Netcode.EditorTests.BaseFastBufferReaderWriterTest.RunTypeArrayTestSafe<T>(T[])
RunTypeTest<T>(T)
Declaration
protected override void RunTypeTest<T>(T valueToTest)
where T : struct
Parameters
Type |
Name |
Description |
T |
valueToTest |
|
Type Parameters
Overrides
Unity.Netcode.EditorTests.BaseFastBufferReaderWriterTest.RunTypeTest<T>(T)
RunTypeTestSafe<T>(T)
Declaration
protected override void RunTypeTestSafe<T>(T valueToTest)
where T : struct
Parameters
Type |
Name |
Description |
T |
valueToTest |
|
Type Parameters
Overrides
Unity.Netcode.EditorTests.BaseFastBufferReaderWriterTest.RunTypeTestSafe<T>(T)
WhenBufferGrows_MaxCapacityIsNotExceeded()
Declaration
public void WhenBufferGrows_MaxCapacityIsNotExceeded()
WhenBufferGrowthRequiredIsMoreThanDouble_BufferGrowsEnoughToContainRequestedValue()
Declaration
public void WhenBufferGrowthRequiredIsMoreThanDouble_BufferGrowsEnoughToContainRequestedValue()
WhenCallingToArray_ReturnedArrayContainsCorrectData()
Declaration
public void WhenCallingToArray_ReturnedArrayContainsCorrectData()
WhenCallingTryBeginWrite_TheAllowedWritePositionIsMarkedRelativeToCurrentPosition()
Declaration
public void WhenCallingTryBeginWrite_TheAllowedWritePositionIsMarkedRelativeToCurrentPosition()
WhenCallingTryBeginWriteInternal_AllowedWritePositionDoesNotMoveBackward()
Declaration
public void WhenCallingTryBeginWriteInternal_AllowedWritePositionDoesNotMoveBackward()
WhenCallingWriteByteAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteByteAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteByteDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteByteDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteBytePastBoundaryMarkedByTryBeginWrite_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteBytePastBoundaryMarkedByTryBeginWrite_OverflowExceptionIsThrown()
WhenCallingWriteByteSafeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteByteSafeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteByteSafeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteByteSafeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteBytesAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteBytesAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteBytesDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteBytesDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteBytesSafeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteBytesSafeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteBytesSafeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteBytesSafeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteBytesWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteBytesWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
WhenCallingWriteByteWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteByteWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
WhenCallingWriteValueAfterCallingTryBeginWriteWithTooFewBytes_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteValueAfterCallingTryBeginWriteWithTooFewBytes_OverflowExceptionIsThrown()
WhenCallingWriteValueSafeWithByteArrayAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueSafeWithByteArrayAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueSafeWithByteArrayDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueSafeWithByteArrayDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueSafeWithStringAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueSafeWithStringAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueSafeWithStringDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueSafeWithStringDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueSafeWithUnmanagedTypeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueSafeWithUnmanagedTypeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueSafeWithUnmanagedTypeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueSafeWithUnmanagedTypeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueWithByteArrayAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueWithByteArrayAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueWithByteArrayDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithByteArrayDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueWithByteArrayWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithByteArrayWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
WhenCallingWriteValueWithStringAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueWithStringAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueWithStringDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithStringDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueWithStringWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithStringWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
WhenCallingWriteValueWithUnmanagedTypeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
Declaration
public void WhenCallingWriteValueWithUnmanagedTypeAfterExitingBitwiseContext_InvalidOperationExceptionIsNotThrown()
WhenCallingWriteValueWithUnmanagedTypeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithUnmanagedTypeDuringBitwiseContext_InvalidOperationExceptionIsThrown()
WhenCallingWriteValueWithUnmanagedTypeWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
Declaration
public void WhenCallingWriteValueWithUnmanagedTypeWithoutCallingTryBeingWriteFirst_OverflowExceptionIsThrown()
WhenCreatingNewFastBufferWriter_CapacityIsCorrect()
Declaration
public void WhenCreatingNewFastBufferWriter_CapacityIsCorrect()
WhenCreatingNewFastBufferWriter_IsInitializedIsTrue()
Declaration
public void WhenCreatingNewFastBufferWriter_IsInitializedIsTrue()
WhenCreatingNewFastBufferWriter_MaxCapacityIsCorrect()
Declaration
public void WhenCreatingNewFastBufferWriter_MaxCapacityIsCorrect()
WhenDisposingFastBufferWriter_IsInitializedIsFalse()
Declaration
public void WhenDisposingFastBufferWriter_IsInitializedIsFalse()
WhenRequestingWriteExactlyAtBoundsForGrowingWriter_BufferDoesntGrow()
Declaration
public void WhenRequestingWriteExactlyAtBoundsForGrowingWriter_BufferDoesntGrow()
WhenRequestingWritePastBoundsForGrowingWriter_BufferGrowsWithoutLosingData()
Declaration
public void WhenRequestingWritePastBoundsForGrowingWriter_BufferGrowsWithoutLosingData()
WhenRequestingWritePastBoundsForNonGrowingWriter_TryBeginWriteReturnsFalse()
Declaration
public void WhenRequestingWritePastBoundsForNonGrowingWriter_TryBeginWriteReturnsFalse()
WhenSeekingBackward_LengthDoesNotChange()
Declaration
public void WhenSeekingBackward_LengthDoesNotChange()
WhenSeekingForward_LengthUpdatesToNewPosition()
Declaration
public void WhenSeekingForward_LengthUpdatesToNewPosition()
WhenTruncatingToCurrentPosition_LengthIsUpdated()
Declaration
public void WhenTruncatingToCurrentPosition_LengthIsUpdated()
WhenTruncatingToSpecificPositionAheadOfWritePosition_LengthIsUpdatedAndPositionIsNot()
Declaration
public void WhenTruncatingToSpecificPositionAheadOfWritePosition_LengthIsUpdatedAndPositionIsNot()
WhenTruncatingToSpecificPositionBehindWritePosition_BothLengthAndPositionAreUpdated()
Declaration
public void WhenTruncatingToSpecificPositionBehindWritePosition_BothLengthAndPositionAreUpdated()
WhenTryBeginWriteReturnsFalse_WritingThrowsOverflowException()
Declaration
public void WhenTryBeginWriteReturnsFalse_WritingThrowsOverflowException()
WhenTryBeginWriteReturnsFalseAndOverflowExceptionIsThrown_DataIsNotAffected()
Declaration
public void WhenTryBeginWriteReturnsFalseAndOverflowExceptionIsThrown_DataIsNotAffected()
WhenTryingToWritePastMaxCapacity_GrowthDoesNotOccurAndTryBeginWriteReturnsFalse()
Declaration
public void WhenTryingToWritePastMaxCapacity_GrowthDoesNotOccurAndTryBeginWriteReturnsFalse()
WhenUsingDefaultFastBufferWriter_IsInitializedIsFalse()
Declaration
public void WhenUsingDefaultFastBufferWriter_IsInitializedIsFalse()
WhenWritingAfterSeeking_TheNewWriteGoesToTheCorrectPosition()
Declaration
public void WhenWritingAfterSeeking_TheNewWriteGoesToTheCorrectPosition()
WhenWritingArrayOfUnmanagedElementType_ArrayIsWrittenCorrectly(Type, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingArrayOfUnmanagedElementType_ArrayIsWrittenCorrectly(Type testType, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingFixedString128Bytes_ValueIsWrittenCorrectly(Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingFixedString128Bytes_ValueIsWrittenCorrectly(int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingFixedString32Bytes_ValueIsWrittenCorrectly(Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingFixedString32Bytes_ValueIsWrittenCorrectly(int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingFixedString4096Bytes_ValueIsWrittenCorrectly(Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingFixedString4096Bytes_ValueIsWrittenCorrectly(int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingFixedString512Bytes_ValueIsWrittenCorrectly(Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingFixedString512Bytes_ValueIsWrittenCorrectly(int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingFixedString64Bytes_ValueIsWrittenCorrectly(Int32, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingFixedString64Bytes_ValueIsWrittenCorrectly(int numBytesWritten, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingPartialValueWithCountAndOffset_ValueIsWrittenCorrectly(Int32, Int32)
Declaration
public void WhenWritingPartialValueWithCountAndOffset_ValueIsWrittenCorrectly(int count, int offset)
Parameters
WhenWritingString_ValueIsWrittenCorrectly(Boolean, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingString_ValueIsWrittenCorrectly(bool oneByteChars, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters
WhenWritingUnmanagedType_ValueIsWrittenCorrectly(Type, BaseFastBufferReaderWriterTest.WriteType)
Declaration
public void WhenWritingUnmanagedType_ValueIsWrittenCorrectly(Type testType, BaseFastBufferReaderWriterTest.WriteType writeType)
Parameters