public class DirCacheIteratorTest extends RepositoryTestCase {
public void testEmptyTree_NoTreeWalk() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
assertEquals(0, dc.getEntryCount());
final DirCacheIterator i = new DirCacheIterator(dc);
}
public void testEmptyTree_WithTreeWalk() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
assertEquals(0, dc.getEntryCount());
final TreeWalk tw = new TreeWalk(db);
}
public void testNoSubtree_NoTreeWalk() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final String[] paths = { "a.", "a0b" };
final DirCacheEntry[] ents = new DirCacheEntry[paths.length];
}
public void testNoSubtree_WithTreeWalk() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final String[] paths = { "a.", "a0b" };
final FileMode[] modes = { FileMode.EXECUTABLE_FILE, FileMode.GITLINK };
}
public void testSingleSubtree_NoRecursion() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final String[] paths = { "a.", "a/b", "a/c", "a/d", "a0b" };
final DirCacheEntry[] ents = new DirCacheEntry[paths.length];
}
public void testSingleSubtree_Recursive() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final FileMode mode = FileMode.REGULAR_FILE;
final String[] paths = { "a.", "a/b", "a/c", "a/d", "a0b" };
}
public void testTwoLevelSubtree_Recursive() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final FileMode mode = FileMode.REGULAR_FILE;
final String[] paths = { "a.", "a/b", "a/c/e", "a/c/f", "a/d", "a0b" };
}
public void testTwoLevelSubtree_FilterPath() throws Exception {
- final DirCache dc = db.readDirCache();
+ final DirCache dc = DirCache.newInCore();
final FileMode mode = FileMode.REGULAR_FILE;
final String[] paths = { "a.", "a/b", "a/c/e", "a/c/f", "a/d", "a0b" };