diff options
author | Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> | 2014-09-01 21:09:59 +0200 |
---|---|---|
committer | Robin Stocker <robin@nibor.org> | 2014-09-02 07:57:04 -0400 |
commit | 9ac59efbbd17bcc41fa82e2ead3b2a0a73206dce (patch) | |
tree | 47b5882e7c9819da6cdeddec6c58cc09e9fc0ca6 /org.eclipse.jgit.test | |
parent | 3885ce2a9403483e1cfd1bb4d3d2a119e3cdd928 (diff) | |
download | jgit-9ac59efbbd17bcc41fa82e2ead3b2a0a73206dce.tar.gz jgit-9ac59efbbd17bcc41fa82e2ead3b2a0a73206dce.zip |
PlotCommitList: Close plot lanes at root commits
Bug: 443006
Change-Id: I40b1eb044fa2d9e6c5d4b956c17e32ca6c1bd39f
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java index 0f582c4001..ecc119b29a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java @@ -668,4 +668,42 @@ public class PlotCommitListTest extends RevWalkTestCase { new PlotLane[] { laneB }, test.current.passingLanes); test.noMoreCommits(); } + + @Test + public void testTwoRoots1() throws Exception { + final RevCommit a = commit(); + final RevCommit b = commit(); + + PlotWalk pw = new PlotWalk(db); + pw.markStart(pw.lookupCommit(a)); + pw.markStart(pw.lookupCommit(b)); + PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>(); + pcl.source(pw); + pcl.fillTo(Integer.MAX_VALUE); + + CommitListAssert test = new CommitListAssert(pcl); + test.commit(b).lanePos(0); + test.commit(a).lanePos(0); + test.noMoreCommits(); + } + + @Test + public void testTwoRoots2() throws Exception { + final RevCommit a = commit(); + final RevCommit b1 = commit(); + final RevCommit b2 = commit(b1); + + PlotWalk pw = new PlotWalk(db); + pw.markStart(pw.lookupCommit(a)); + pw.markStart(pw.lookupCommit(b2)); + PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>(); + pcl.source(pw); + pcl.fillTo(Integer.MAX_VALUE); + + CommitListAssert test = new CommitListAssert(pcl); + test.commit(b2).lanePos(0); + test.commit(b1).lanePos(0); + test.commit(a).lanePos(0); + test.noMoreCommits(); + } } |