mirror of https://github.com/apache/lucene.git
use assertArrayEquals instead of the deprecated version
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1103601 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a8e4d246a
commit
680bb70e3a
|
@ -218,11 +218,11 @@ public class TestGrouping extends LuceneTestCase {
|
|||
};
|
||||
}
|
||||
|
||||
private Comparable[] fillFields(GroupDoc d, Sort sort) {
|
||||
private Comparable<?>[] fillFields(GroupDoc d, Sort sort) {
|
||||
final SortField[] sortFields = sort.getSort();
|
||||
final Comparable[] fields = new Comparable[sortFields.length];
|
||||
final Comparable<?>[] fields = new Comparable[sortFields.length];
|
||||
for(int fieldIDX=0;fieldIDX<sortFields.length;fieldIDX++) {
|
||||
final Comparable c;
|
||||
final Comparable<?> c;
|
||||
final SortField sf = sortFields[fieldIDX];
|
||||
if (sf.getField().equals("sort1")) {
|
||||
c = d.sort1;
|
||||
|
@ -254,7 +254,7 @@ public class TestGrouping extends LuceneTestCase {
|
|||
Arrays.sort(groupDocs, groupSortComp);
|
||||
final HashMap<BytesRef,List<GroupDoc>> groups = new HashMap<BytesRef,List<GroupDoc>>();
|
||||
final List<BytesRef> sortedGroups = new ArrayList<BytesRef>();
|
||||
final List<Comparable[]> sortedGroupFields = new ArrayList<Comparable[]>();
|
||||
final List<Comparable<?>[]> sortedGroupFields = new ArrayList<Comparable<?>[]>();
|
||||
|
||||
int totalHitCount = 0;
|
||||
|
||||
|
@ -516,7 +516,7 @@ public class TestGrouping extends LuceneTestCase {
|
|||
final GroupDocs expectedGroup = expected.groups[groupIDX];
|
||||
final GroupDocs actualGroup = actual.groups[groupIDX];
|
||||
assertEquals(expectedGroup.groupValue, actualGroup.groupValue);
|
||||
assertEquals(expectedGroup.groupSortValues, actualGroup.groupSortValues);
|
||||
assertArrayEquals(expectedGroup.groupSortValues, actualGroup.groupSortValues);
|
||||
|
||||
// TODO
|
||||
// assertEquals(expectedGroup.maxScore, actualGroup.maxScore);
|
||||
|
@ -532,7 +532,7 @@ public class TestGrouping extends LuceneTestCase {
|
|||
assertEquals(expectedFD.doc, docIDtoID[actualFD.doc]);
|
||||
// TODO
|
||||
// assertEquals(expectedFD.score, actualFD.score);
|
||||
assertEquals(expectedFD.fields, actualFD.fields);
|
||||
assertArrayEquals(expectedFD.fields, actualFD.fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue