diff options
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackIndexTestCase.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackIndexTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackIndexTestCase.java index aa3817e3ad..7eeb0c0eaa 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackIndexTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackIndexTestCase.java @@ -158,6 +158,21 @@ public abstract class PackIndexTestCase extends RepositoryTestCase { } /** + * Compare offset from iterator entries with output of getOffset() method. + */ + @Test + public void testCompareEntriesOffsetsWithGetOffsets() { + int i = 0; + for (MutableEntry me : smallIdx) { + assertEquals(smallIdx.getOffset(i++), me.getOffset()); + } + int j = 0; + for (MutableEntry me : denseIdx) { + assertEquals(denseIdx.getOffset(j++), me.getOffset()); + } + } + + /** * Test partial results of iterator comparing to content of well-known * (prepared) dense index, that may need multi-level indexing. */ |