Ignore boxing errors in test code

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477789 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2013-04-30 19:28:27 +00:00
parent 46a1c86ab3
commit d403368879
9 changed files with 21 additions and 0 deletions

View File

@ -311,6 +311,7 @@ public class ListUtilsTest extends BulkTest {
assertEquals(ListUtils.indexOf(fullList, null), -1);
}
@SuppressWarnings("boxing") // OK in test code
public void testLongestCommonSubsequence() {
try {
@ -388,6 +389,7 @@ public class ListUtilsTest extends BulkTest {
assertEquals(0, lcs.length());
}
@SuppressWarnings("boxing") // OK in test code
public void testPartition() {
final List<Integer> strings = new ArrayList<Integer>();
for (int i = 0; i <= 6; i++) {
@ -423,6 +425,7 @@ public class ListUtilsTest extends BulkTest {
}
};
@SuppressWarnings("boxing") // OK in test code
public void testSelect() {
final List<Integer> list = new ArrayList<Integer>();
list.add(1);
@ -439,6 +442,7 @@ public class ListUtilsTest extends BulkTest {
assertEquals(2, output2.iterator().next());
}
@SuppressWarnings("boxing") // OK in test code
public void testSelectRejected() {
final List<Long> list = new ArrayList<Long>();
list.add(1L);

View File

@ -145,6 +145,7 @@ public class TransformerUtilsTest extends junit.framework.TestCase {
// mapTransformer
//------------------------------------------------------------------
@SuppressWarnings("boxing") // OK in test code
public void testMapTransformer() {
final Map<Object, Integer> map = new HashMap<Object, Integer>();
map.put(null, 0);

View File

@ -50,6 +50,7 @@ public class TransformingComparatorTest extends AbstractComparatorTest<Integer>
}
@Override
@SuppressWarnings("boxing") // OK in test code
public List<Integer> getComparableObjectsOrdered() {
final List<Integer> list = new LinkedList<Integer>();
list.add(1);

View File

@ -32,6 +32,7 @@ import java.util.Set;
*/
public class PermutationIteratorTest extends AbstractIteratorTest<List<Character>> {
@SuppressWarnings("boxing") // OK in test code
protected Character[] testArray = { 'A', 'B', 'C' };
protected List<Character> testList;
@ -69,6 +70,7 @@ public class PermutationIteratorTest extends AbstractIteratorTest<List<Character
//-----------------------------------------------------------------------
@SuppressWarnings("boxing") // OK in test code
public void testPermutationResultSize() {
int factorial = 1;
for (int i = 0; i < 8; i++, factorial*=i) {
@ -89,6 +91,7 @@ public class PermutationIteratorTest extends AbstractIteratorTest<List<Character
/**
* test checking that all the permutations are returned
*/
@SuppressWarnings("boxing") // OK in test code
public void testPermutationExhaustivity() {
List<Character> perm1 = new ArrayList<Character>();
List<Character> perm2 = new ArrayList<Character>();

View File

@ -564,6 +564,7 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
/*
* test case for https://issues.apache.org/jira/browse/COLLECTIONS-427
*/
@SuppressWarnings("boxing") // OK in test code
public void testRetainAllCollections427() {
final int size = 50000;
final ArrayList<Integer> list = new ArrayList<Integer>();

View File

@ -268,6 +268,7 @@ public class TreeListTest<E> extends AbstractListTest<E> {
assertEquals("A", li.previous());
}
@SuppressWarnings("boxing") // OK in test code
public void testIterationOrder() {
// COLLECTIONS-433:
// ensure that the iteration order of elements is correct
@ -293,6 +294,7 @@ public class TreeListTest<E> extends AbstractListTest<E> {
}
}
@SuppressWarnings("boxing") // OK in test code
public void testIterationOrderAfterAddAll() {
// COLLECTIONS-433:
// ensure that the iteration order of elements is correct

View File

@ -1275,6 +1275,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
/**
* Verifies that values.iterator.remove changes the underlying map.
*/
@SuppressWarnings("boxing") // OK in test code
public void testValuesIteratorRemoveChangesMap() {
resetFull();
final List<V> sampleValuesAsList = Arrays.asList(getSampleValues());

View File

@ -205,6 +205,7 @@ public class ListOrderedSetTest<E>
/*
* test case for https://issues.apache.org/jira/browse/COLLECTIONS-426
*/
@SuppressWarnings("boxing") // OK in test code
public void testRetainAllCollections426() {
final int size = 100000;
final ListOrderedSet<Integer> set = new ListOrderedSet<Integer>();

View File

@ -49,6 +49,7 @@ import org.junit.Test;
public class PatriciaTrieTest {
@Test
@SuppressWarnings("boxing") // OK in test code
public void testSimple() {
final PatriciaTrie<Integer, String> intTrie = new PatriciaTrie<Integer, String>(new IntegerKeyAnalyzer());
Assert.assertTrue(intTrie.isEmpty());
@ -73,6 +74,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testCeilingEntry() {
final PatriciaTrie<Character, String> charTrie
= new PatriciaTrie<Character, String>(new CharacterKeyAnalyzer());
@ -166,6 +168,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testLowerEntry() {
final PatriciaTrie<Character, String> charTrie = new PatriciaTrie<Character, String>(new CharacterKeyAnalyzer());
charTrie.put('c', "c");
@ -277,6 +280,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testIteration() {
final PatriciaTrie<Integer, String> intTrie = new PatriciaTrie<Integer, String>(new IntegerKeyAnalyzer());
intTrie.put(1, "One");
@ -373,6 +377,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testSelect() {
final PatriciaTrie<Character, String> charTrie = new PatriciaTrie<Character, String>(new CharacterKeyAnalyzer());
charTrie.put('c', "c");
@ -418,6 +423,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testTraverseCursorRemove() {
final PatriciaTrie<Character, String> charTrie = new PatriciaTrie<Character, String>(new CharacterKeyAnalyzer());
charTrie.put('c', "c");
@ -486,6 +492,7 @@ public class PatriciaTrieTest {
}
@Test
@SuppressWarnings("boxing") // OK in test code
public void testIteratorRemove() {
final PatriciaTrie<Character, String> charTrie = new PatriciaTrie<Character, String>(new CharacterKeyAnalyzer());
charTrie.put('c', "c");