From 680bb70e3ac96a50a8c54a8f57d0e317f2a6ef17 Mon Sep 17 00:00:00 2001 From: Shai Erera Date: Mon, 16 May 2011 03:17:55 +0000 Subject: [PATCH] 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 --- .../apache/lucene/search/grouping/TestGrouping.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java b/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java index a36bf3d6b62..57710a31e01 100644 --- a/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java +++ b/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java @@ -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 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> groups = new HashMap>(); final List sortedGroups = new ArrayList(); - final List sortedGroupFields = new ArrayList(); + final List[]> sortedGroupFields = new ArrayList[]>(); 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); } } }