Skip to content

Commit

Permalink
Added test for identical old/new data
Browse files Browse the repository at this point in the history
  • Loading branch information
jzebedee committed Nov 14, 2014
1 parent ae8a171 commit a455605
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deltaq-tests/BsDiffTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ public void BsDiffCreateFromBuffers()
}
}

[Test]
public void BsDiffCreateFromBuffers_Identical()
{
foreach (var oldBuffer in GetBuffers(Sizes))
{
var newBuffer = new byte[oldBuffer.Length];
Buffer.BlockCopy(oldBuffer, 0, newBuffer, 0, oldBuffer.Length);

var patchBuf = BsDiffCreate(oldBuffer, newBuffer);
var finishedBuf = BsDiffApply(oldBuffer, patchBuf);

Assert.AreEqual(oldBuffer, finishedBuf);
Assert.AreEqual(newBuffer, finishedBuf);
}
}

[Test]
public void BsDiffCreateFromStreams()
{
Expand Down

0 comments on commit a455605

Please sign in to comment.