Unless I'm using your library incorrectly It looks like the Differencer.FindDifferences method is not reporting inserts at the beginning of a sequence. Most likely it's not reporting removes either but I didn't test for that.
Using the following code:
List<string> olderList = new List<string>(new string[] {
"public class MyException extends Exception {",
"",
"}"
});
List<string> newerList = new List<string>(new string[] {
"/**",
" * Simple exception.",
" */",
"public class MyException extends Exception {",
"",
"}"
});
DiffLib.PatienceSequenceMatcher<string> matcher = new DiffLib.PatienceSequenceMatcher<string>();
DiffLib.Differencer<string> differencer = new DiffLib.Differencer<string>(matcher);
IEnumerable<DiffLib.DifferenceInstruction> diffs = differencer.FindDifferences(
olderList,
newerList);
I'm expecting the diffs collection to have the following results:
{+ (0, 0 -> 2)}
{= (0 -> 2, 3 -> 5)}
However the actual results are:
{= (0 -> 2, 3 -> 5)}
Unless I'm using your library incorrectly It looks like the Differencer.FindDifferences method is not reporting inserts at the beginning of a sequence. Most likely it's not reporting removes either but I didn't test for that.
Using the following code:
I'm expecting the diffs collection to have the following results: {+ (0, 0 -> 2)} {= (0 -> 2, 3 -> 5)}
However the actual results are: {= (0 -> 2, 3 -> 5)}