NoteMapTest: Add missing @Test annotations
The RepositoryTestCase hierarchy no longer comes from TestCase, so all test methods must have @Test. Fix one test that was broken but never run; fortunately this was just a typo in the test code. Change-Id: I3ac8ccdab5e2d5539c63d7b0a88d8bdb0c5ff66e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
2d4d64481b
commit
649ad06586
|
@ -449,11 +449,13 @@ public void testRemoveDeletesTreeFanout2_38() throws Exception {
|
||||||
assertEquals("empty tree", empty, n.getTree());
|
assertEquals("empty tree", empty, n.getTree());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testIteratorEmptyMap() {
|
public void testIteratorEmptyMap() {
|
||||||
Iterator<Note> it = NoteMap.newEmptyMap().iterator();
|
Iterator<Note> it = NoteMap.newEmptyMap().iterator();
|
||||||
assertFalse(it.hasNext());
|
assertFalse(it.hasNext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testIteratorFlatTree() throws Exception {
|
public void testIteratorFlatTree() throws Exception {
|
||||||
RevBlob a = tr.blob("a");
|
RevBlob a = tr.blob("a");
|
||||||
RevBlob b = tr.blob("b");
|
RevBlob b = tr.blob("b");
|
||||||
|
@ -472,6 +474,7 @@ public void testIteratorFlatTree() throws Exception {
|
||||||
assertEquals(2, count(it));
|
assertEquals(2, count(it));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testIteratorFanoutTree2_38() throws Exception {
|
public void testIteratorFanoutTree2_38() throws Exception {
|
||||||
RevBlob a = tr.blob("a");
|
RevBlob a = tr.blob("a");
|
||||||
RevBlob b = tr.blob("b");
|
RevBlob b = tr.blob("b");
|
||||||
|
@ -490,6 +493,7 @@ public void testIteratorFanoutTree2_38() throws Exception {
|
||||||
assertEquals(2, count(it));
|
assertEquals(2, count(it));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testIteratorFanoutTree2_2_36() throws Exception {
|
public void testIteratorFanoutTree2_2_36() throws Exception {
|
||||||
RevBlob a = tr.blob("a");
|
RevBlob a = tr.blob("a");
|
||||||
RevBlob b = tr.blob("b");
|
RevBlob b = tr.blob("b");
|
||||||
|
@ -508,6 +512,7 @@ public void testIteratorFanoutTree2_2_36() throws Exception {
|
||||||
assertEquals(2, count(it));
|
assertEquals(2, count(it));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testIteratorFullyFannedOut() throws Exception {
|
public void testIteratorFullyFannedOut() throws Exception {
|
||||||
RevBlob a = tr.blob("a");
|
RevBlob a = tr.blob("a");
|
||||||
RevBlob b = tr.blob("b");
|
RevBlob b = tr.blob("b");
|
||||||
|
@ -526,12 +531,13 @@ public void testIteratorFullyFannedOut() throws Exception {
|
||||||
assertEquals(2, count(it));
|
assertEquals(2, count(it));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testShorteningNoteRefName() throws Exception {
|
public void testShorteningNoteRefName() throws Exception {
|
||||||
String expectedShortName = "review";
|
String expectedShortName = "review";
|
||||||
String noteRefName = Constants.R_NOTES + expectedShortName;
|
String noteRefName = Constants.R_NOTES + expectedShortName;
|
||||||
assertEquals(expectedShortName, NoteMap.shortenRefName(noteRefName));
|
assertEquals(expectedShortName, NoteMap.shortenRefName(noteRefName));
|
||||||
String nonNoteRefName = Constants.R_HEADS + expectedShortName;
|
String nonNoteRefName = Constants.R_HEADS + expectedShortName;
|
||||||
assertEquals(nonNoteRefName, NoteMap.shortenRefName(expectedShortName));
|
assertEquals(nonNoteRefName, NoteMap.shortenRefName(nonNoteRefName));
|
||||||
}
|
}
|
||||||
|
|
||||||
private RevCommit commitNoteMap(NoteMap map) throws IOException {
|
private RevCommit commitNoteMap(NoteMap map) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue