summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
index 47b08a7e16..325c9e2eba 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
@@ -449,11 +449,13 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals("empty tree", empty, n.getTree());
}
+ @Test
public void testIteratorEmptyMap() {
Iterator<Note> it = NoteMap.newEmptyMap().iterator();
assertFalse(it.hasNext());
}
+ @Test
public void testIteratorFlatTree() throws Exception {
RevBlob a = tr.blob("a");
RevBlob b = tr.blob("b");
@@ -472,6 +474,7 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals(2, count(it));
}
+ @Test
public void testIteratorFanoutTree2_38() throws Exception {
RevBlob a = tr.blob("a");
RevBlob b = tr.blob("b");
@@ -490,6 +493,7 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals(2, count(it));
}
+ @Test
public void testIteratorFanoutTree2_2_36() throws Exception {
RevBlob a = tr.blob("a");
RevBlob b = tr.blob("b");
@@ -508,6 +512,7 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals(2, count(it));
}
+ @Test
public void testIteratorFullyFannedOut() throws Exception {
RevBlob a = tr.blob("a");
RevBlob b = tr.blob("b");
@@ -526,12 +531,13 @@ public class NoteMapTest extends RepositoryTestCase {
assertEquals(2, count(it));
}
+ @Test
public void testShorteningNoteRefName() throws Exception {
String expectedShortName = "review";
String noteRefName = Constants.R_NOTES + expectedShortName;
assertEquals(expectedShortName, NoteMap.shortenRefName(noteRefName));
String nonNoteRefName = Constants.R_HEADS + expectedShortName;
- assertEquals(nonNoteRefName, NoteMap.shortenRefName(expectedShortName));
+ assertEquals(nonNoteRefName, NoteMap.shortenRefName(nonNoteRefName));
}
private RevCommit commitNoteMap(NoteMap map) throws IOException {