mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkWriterTest: empty arraysegment
This commit is contained in:
parent
a76fa59fee
commit
9dd1420edf
@ -513,6 +513,16 @@ public void TestToArraySegment()
|
||||
Assert.That(reader.ReadString(), Is.EqualTo("world"));
|
||||
}
|
||||
|
||||
// sometimes we may serialize nothing, then call ToArraySegment.
|
||||
// make sure this works even if empty.
|
||||
[Test]
|
||||
public void TestToArraySegment_EmptyContent()
|
||||
{
|
||||
NetworkWriter writer = new NetworkWriter();
|
||||
ArraySegment<byte> segment = writer.ToArraySegment();
|
||||
Assert.That(segment.Count, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestChar()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user