void returns

This commit is contained in:
vis2k 2022-10-18 16:31:45 +02:00
parent c221a61604
commit edabc88279
2 changed files with 8 additions and 8 deletions

View File

@ -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]

View File

@ -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();