Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java
index f93343aab6..3f61698cf0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java
@@ -44,11 +44,16 @@
package org.eclipse.jgit.lib;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.eclipse.jgit.lib.GitIndex.Entry;
+import org.junit.Test;
public class IndexTreeWalkerTest extends RepositoryTestCase {
private ArrayList<String> treeOnlyEntriesVisited = new ArrayList<String>();
@@ -74,6 +79,7 @@ public class IndexTreeWalkerTest extends RepositoryTestCase {
* because I already
*/
+ @Test
public void testTreeOnlyOneLevel() throws IOException {
GitIndex index = new GitIndex(db);
Tree tree = new Tree(db);
@@ -86,6 +92,7 @@ public class IndexTreeWalkerTest extends RepositoryTestCase {
assertTrue(treeOnlyEntriesVisited.get(1).equals("foo"));
}
+ @Test
public void testIndexOnlyOneLevel() throws IOException {
GitIndex index = new GitIndex(db);
Tree tree = new Tree(db);
@@ -98,6 +105,7 @@ public class IndexTreeWalkerTest extends RepositoryTestCase {
assertTrue(indexOnlyEntriesVisited.get(1).equals("foo"));
}
+ @Test
public void testBoth() throws IOException {
GitIndex index = new GitIndex(db);
Tree tree = new Tree(db);
@@ -114,6 +122,7 @@ public class IndexTreeWalkerTest extends RepositoryTestCase {
}
+ @Test
public void testIndexOnlySubDirs() throws IOException {
GitIndex index = new GitIndex(db);
Tree tree = new Tree(db);
@@ -126,6 +135,7 @@ public class IndexTreeWalkerTest extends RepositoryTestCase {
assertEquals("foo/bar/baz", indexOnlyEntriesVisited.get(1));
}
+ @Test
public void testLeavingTree() throws IOException {
GitIndex index = new GitIndex(db);
index.add(trash, writeTrashFile("foo/bar", "foo/bar"));

Back to the top