mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
void returns
This commit is contained in:
parent
c221a61604
commit
edabc88279
@ -10,10 +10,10 @@ public class BitTreeTests : DeltaCompressionTest
|
||||
public override int MaxPatchSize(int inputLength, int blockSize) =>
|
||||
BitTree.MaxPatchSize(inputLength);
|
||||
|
||||
public override bool Compress(ArraySegment<byte> previous, ArraySegment<byte> current, int blockSize, NetworkWriter patch) =>
|
||||
public override void Compress(ArraySegment<byte> previous, ArraySegment<byte> current, int blockSize, NetworkWriter patch) =>
|
||||
BitTree.Compress(previous, current, patch);
|
||||
|
||||
public override bool Decompress(ArraySegment<byte> previous, NetworkReader patch, int blockSize, NetworkWriter current) =>
|
||||
public override void Decompress(ArraySegment<byte> previous, NetworkReader patch, int blockSize, NetworkWriter current) =>
|
||||
BitTree.Decompress(previous, patch, current);
|
||||
|
||||
[Test]
|
||||
|
@ -13,8 +13,8 @@ public abstract class DeltaCompressionTest
|
||||
|
||||
// implementation specific
|
||||
public abstract int MaxPatchSize(int inputLength, int blockSize);
|
||||
public abstract bool Compress(ArraySegment<byte> previous, ArraySegment<byte> current, int blockSize, NetworkWriter patch);
|
||||
public abstract bool Decompress(ArraySegment<byte> previous, NetworkReader patch, int blockSize, NetworkWriter current);
|
||||
public abstract void Compress(ArraySegment<byte> previous, ArraySegment<byte> current, int blockSize, NetworkWriter patch);
|
||||
public abstract void Decompress(ArraySegment<byte> previous, NetworkReader patch, int blockSize, NetworkWriter current);
|
||||
|
||||
[SetUp]
|
||||
public virtual void SetUp()
|
||||
@ -35,8 +35,8 @@ public void CompressAndDecompress(
|
||||
int compressWriterStart = compressWriter.Position;
|
||||
|
||||
// compress with block size into compressWriter
|
||||
bool result = Compress(previous, current, blockSize, compressWriter);
|
||||
Assert.That(result, Is.True);
|
||||
Compress(previous, current, blockSize, compressWriter);
|
||||
// Assert.That(result, Is.True);
|
||||
|
||||
// guarantee patch size (if given)
|
||||
int compressedSize = compressWriter.Position - compressWriterStart;
|
||||
@ -48,8 +48,8 @@ public void CompressAndDecompress(
|
||||
|
||||
// decompress patch against previous
|
||||
NetworkReader patch = new NetworkReader(compressedContent);
|
||||
result = Decompress(previous, patch, blockSize, decompressWriter);
|
||||
Assert.That(result, Is.True);
|
||||
Decompress(previous, patch, blockSize, decompressWriter);
|
||||
// Assert.That(result, Is.True);
|
||||
|
||||
// make sure decompressed == current as expected
|
||||
ArraySegment<byte> decompressed = decompressWriter.ToArraySegment();
|
||||
|
Loading…
Reference in New Issue
Block a user