Skip to content

Commit 67e4fd7

Browse files
Merge branch 'floattest' of git://github.com/paulpach/MLAPI into floattest
2 parents 0b83ba3 + ecaddb0 commit 67e4fd7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

MLAPI.Tests/NetworkingManagerComponents/Binary/BitStreamTest.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ public void TestWriteMisaligned()
339339
// now the stream is misalligned, lets write some bytes
340340
outStream.WriteByte(244);
341341
outStream.WriteByte(123);
342-
342+
outStream.WriteInt16(-5457);
343+
outStream.WriteUInt64(4773753249);
344+
outStream.WriteUInt64Packed(5435285812313212);
345+
outStream.WriteInt64Packed(-5435285812313212);
343346
outStream.WriteBit(true);
344347
outStream.WriteByte(1);
345348
outStream.WriteByte(0);
@@ -352,12 +355,13 @@ public void TestWriteMisaligned()
352355
Assert.That(inStream.ReadBit(), Is.False);
353356
Assert.That(inStream.ReadByte(), Is.EqualTo(244));
354357
Assert.That(inStream.ReadByte(), Is.EqualTo(123));
358+
Assert.That(inStream.ReadInt16(), Is.EqualTo(-5457));
359+
Assert.That(inStream.ReadUInt64(), Is.EqualTo(4773753249));
360+
Assert.That(inStream.ReadUInt64Packed(), Is.EqualTo(5435285812313212));
361+
Assert.That(inStream.ReadInt64Packed(), Is.EqualTo(-5435285812313212));
355362
Assert.That(inStream.ReadBit(), Is.True);
356363
Assert.That(inStream.ReadByte(), Is.EqualTo(1));
357364
Assert.That(inStream.ReadByte(), Is.EqualTo(0));
358-
359-
360-
361365
}
362366
}
363367
}

0 commit comments

Comments
 (0)