diff options
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/HistogramDiffTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/HistogramDiffTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/HistogramDiffTest.java index ba0d7d8e35..f9353af174 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/HistogramDiffTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/HistogramDiffTest.java @@ -74,6 +74,14 @@ public class HistogramDiffTest extends AbstractDiffTestCase { assertEquals(new Edit(3, 3, 2, 5), r.get(1)); // INSERT "SRR" } + public void testEdit_LcsContainsUnique() { + EditList r = diff(t("nqnjrnjsnm"), t("AnqnjrnjsnjTnmZ")); + assertEquals(new Edit(0, 0, 0, 1), r.get(0)); // INSERT "A"; + assertEquals(new Edit(9, 9, 10, 13), r.get(1)); // INSERT "jTn"; + assertEquals(new Edit(10, 10, 14, 15), r.get(2)); // INSERT "Z"; + assertEquals(3, r.size()); + } + public void testExceedsChainLength_DuringScanOfA() { HistogramDiff hd = new HistogramDiff(); hd.setFallbackAlgorithm(null); |