File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Microsoft.Toolkit.HighPerformance/Streams
UnitTests/UnitTests.HighPerformance.Shared/Streams Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,8 @@ public override void WriteByte(byte value)
158
158
MemoryStream . ValidateDisposed ( this . disposed ) ;
159
159
160
160
this . bufferWriter . GetSpan ( 1 ) [ 0 ] = value ;
161
+
162
+ this . bufferWriter . Advance ( 1 ) ;
161
163
}
162
164
163
165
/// <inheritdoc/>
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ public void Test_IBufferWriterStream_Lifecycle()
24
24
25
25
Stream stream = ( ( IBufferWriter < byte > ) writer ) . AsStream ( ) ;
26
26
27
- Assert . IsTrue ( stream . CanRead ) ;
27
+ Assert . IsFalse ( stream . CanRead ) ;
28
28
Assert . IsFalse ( stream . CanSeek ) ;
29
- Assert . IsFalse ( stream . CanWrite ) ;
29
+ Assert . IsTrue ( stream . CanWrite ) ;
30
30
31
31
Assert . ThrowsException < NotSupportedException > ( ( ) => stream . Length ) ;
32
32
Assert . ThrowsException < NotSupportedException > ( ( ) => stream . Position ) ;
You can’t perform that action at this time.
0 commit comments