address a few TODOs
This commit is contained in:
parent
43dcee2fa9
commit
e14a5c8fe6
@ -121,7 +121,14 @@ namespace Google.Protobuf
|
||||
message.WriteTo(singleSpan);
|
||||
Assert.AreEqual(bytes, singleSpan.ToArray());
|
||||
|
||||
// TODO: also test different chunk sizes for IBufferWriter
|
||||
// test for different IBufferWriter.GetSpan() segment sizes
|
||||
for (int blockSize = 1; blockSize < 256; blockSize *= 2)
|
||||
{
|
||||
var segmentedBufferWriter = new ArrayBufferWriter<byte>();
|
||||
segmentedBufferWriter.MaxGrowBy = blockSize;
|
||||
message.WriteTo(segmentedBufferWriter);
|
||||
Assert.AreEqual(bytes, bufferWriter.WrittenSpan.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -160,8 +160,6 @@ namespace Google.Protobuf
|
||||
WriteContext.Initialize(output, out WriteContext ctx);
|
||||
WritingPrimitivesMessages.WriteRawMessage(ref ctx, message);
|
||||
ctx.Flush();
|
||||
|
||||
// TODO: handling errors when IBufferWriter is used?
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user