You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/04/30 16:27:37 UTC
svn commit: r1477661 [1/3] - in
/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4:
./ bag/ bidimap/ collection/ comparators/ functors/ iterators/ keyvalue/
list/ map/ queue/ set/ trie/
Author: sebb
Date: Tue Apr 30 14:27:35 2013
New Revision: 1477661
URL: http://svn.apache.org/r1477661
Log:
Trailing spaces
Modified:
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractLinkedListTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ArrayStackTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/BulkTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapPerformance.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/HashBagTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualHashBidiMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualLinkedHashBidiMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/TreeBidiMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/IndexedCollectionTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractComparatorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/ComparatorPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/EqualPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/NullPredicateTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/AbstractIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorIterableTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LoopingIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LoopingListIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/PermutationIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/SingletonListIteratorTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/AbstractMapEntryTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/DefaultKeyValueTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/AbstractMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/CompositeMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/EmptyMapMutator.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LRUMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ListOrderedMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/CircularFifoQueueTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/PredicatedQueueTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/EmptySetMutator.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/ByteArrayKeyAnalyzerTest.java
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractLinkedListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractLinkedListTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractLinkedListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractLinkedListTest.java Tue Apr 30 14:27:35 2013
@@ -141,7 +141,7 @@ public abstract class AbstractLinkedList
// This is correct
}
verify();
-
+
resetFull();
final Object last = getCollection().getLast();
final Object confirmedLast = getConfirmedLinkedList().getLast();
@@ -167,7 +167,7 @@ public abstract class AbstractLinkedList
// This is correct
}
verify();
-
+
resetFull();
final Object first = getCollection().removeFirst();
final Object confirmedFirst = getConfirmedLinkedList().removeFirst();
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/AbstractObjectTest.java Tue Apr 30 14:27:35 2013
@@ -44,10 +44,10 @@ public abstract class AbstractObjectTest
/** Current major release for Collections */
public static final int COLLECTIONS_MAJOR_VERSION = 4;
-
+
/**
* JUnit constructor.
- *
+ *
* @param testName the test class name
*/
public AbstractObjectTest(final String testName) {
@@ -57,7 +57,7 @@ public abstract class AbstractObjectTest
//-----------------------------------------------------------------------
/**
* Implement this method to return the object to test.
- *
+ *
* @return the object to test
*/
public abstract Object makeObject();
@@ -66,7 +66,7 @@ public abstract class AbstractObjectTest
* Override this method if a subclass is testing an object
* that cannot serialize an "empty" Collection.
* (e.g. Comparators have no contents)
- *
+ *
* @return true
*/
public boolean supportsEmptyCollections() {
@@ -77,7 +77,7 @@ public abstract class AbstractObjectTest
* Override this method if a subclass is testing an object
* that cannot serialize a "full" Collection.
* (e.g. Comparators have no contents)
- *
+ *
* @return true
*/
public boolean supportsFullCollections() {
@@ -159,9 +159,9 @@ public abstract class AbstractObjectTest
/**
* Sanity check method, makes sure that any Serializable
- * class can be serialized and de-serialized in memory,
+ * class can be serialized and de-serialized in memory,
* using the handy makeObject() method
- *
+ *
* @throws IOException
* @throws ClassNotFoundException
*/
@@ -211,14 +211,14 @@ public abstract class AbstractObjectTest
* Get the version of Collections that this object tries to
* maintain serialization compatibility with. Defaults to 4, due to
* the package change to collections4 introduced in version 4.
- *
+ *
* This constant makes it possible for TestMap (and other subclasses,
* if necessary) to automatically check SVN for a versionX copy of a
* Serialized object, so we can make sure that compatibility is maintained.
* See, for example, TestMap.getCanonicalFullMapName(Map map).
* Subclasses can override this variable, indicating compatibility
* with earlier Collections versions.
- *
+ *
* @return The version, or <code>null</code> if this object shouldn't be
* tested for compatibility with previous versions.
*/
@@ -257,7 +257,7 @@ public abstract class AbstractObjectTest
* for creating disk-based objects in SVN that can become
* the basis for compatibility tests using
* readExternalFormFromDisk(String path)
- *
+ *
* @param o Object to serialize
* @param path path to write the serialized Object
* @exception IOException
@@ -270,7 +270,7 @@ public abstract class AbstractObjectTest
/**
* Converts a Serializable or Externalizable object to
* bytes. Useful for in-memory tests of serialization
- *
+ *
* @param o Object to convert to bytes
* @return serialized form of the Object
* @exception IOException
@@ -285,7 +285,7 @@ public abstract class AbstractObjectTest
* Reads a Serialized or Externalized Object from disk.
* Useful for creating compatibility tests between
* different SVN versions of the same class
- *
+ *
* @param path path to the serialized Object
* @return the Object at the given path
* @exception IOException
@@ -299,7 +299,7 @@ public abstract class AbstractObjectTest
/**
* Read a Serialized or Externalized Object from bytes.
* Useful for verifying serialization in memory.
- *
+ *
* @param b byte array containing a serialized Object
* @return Object contained in the bytes
* @exception IOException
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ArrayStackTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ArrayStackTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ArrayStackTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ArrayStackTest.java Tue Apr 30 14:27:35 2013
@@ -29,7 +29,7 @@ import junit.framework.Test;
*/
@SuppressWarnings("deprecation") // we test a deprecated class
public class ArrayStackTest<E> extends AbstractArrayListTest<E> {
-
+
public ArrayStackTest(final String testName) {
super(testName);
}
@@ -109,7 +109,7 @@ public class ArrayStackTest<E> extends A
-1, stack.search("Missing Item"));
}
-
+
@Override
public String getCompatibilityVersion() {
return "4";
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/BulkTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/BulkTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/BulkTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/BulkTest.java Tue Apr 30 14:27:35 2013
@@ -30,15 +30,15 @@ import junit.framework.TestSuite;
/**
* A {@link TestCase} that can define both simple and bulk test methods.
* <p>
- * A <I>simple test method</I> is the type of test traditionally
- * supplied by by {@link TestCase}. To define a simple test, create a public
+ * A <I>simple test method</I> is the type of test traditionally
+ * supplied by by {@link TestCase}. To define a simple test, create a public
* no-argument method whose name starts with "test". You can specify the
* the name of simple test in the constructor of <code>BulkTest</code>;
* a subsequent call to {@link TestCase#run} will run that simple test.
* <p>
* A <I>bulk test method</I>, on the other hand, returns a new instance
* of <code>BulkTest</code>, which can itself define new simple and bulk
- * test methods. By using the {@link #makeSuite} method, you can
+ * test methods. By using the {@link #makeSuite} method, you can
* automatically create a hierarchical suite of tests and child bulk tests.
* <p>
* For instance, consider the following two classes:
@@ -92,7 +92,7 @@ import junit.framework.TestSuite;
* In the above examples, <code>SetTest</code> defines two
* simple test methods and no bulk test methods; <code>HashMapTest</code>
* defines one simple test method and two bulk test methods. When
- * <code>makeSuite(HashMapTest.class).run</code> is executed,
+ * <code>makeSuite(HashMapTest.class).run</code> is executed,
* <I>five</I> simple test methods will be run, in this order:<P>
*
* <Ol>
@@ -130,7 +130,7 @@ import junit.framework.TestSuite;
*
* Note that if you want to use the bulk test methods, you <I>must</I>
* define your <code>suite()</code> method to use {@link #makeSuite}.
- * The ordinary {@link TestSuite} constructor doesn't know how to
+ * The ordinary {@link TestSuite} constructor doesn't know how to
* interpret bulk test methods.
*
* @version $Id$
@@ -138,13 +138,13 @@ import junit.framework.TestSuite;
public class BulkTest extends TestCase implements Cloneable {
- // Note: BulkTest is Cloneable to make it easier to construct
- // BulkTest instances for simple test methods that are defined in
+ // Note: BulkTest is Cloneable to make it easier to construct
+ // BulkTest instances for simple test methods that are defined in
// anonymous inner classes. Basically we don't have to worry about
// finding weird constructors. (And even if we found them, technically
- // it'd be illegal for anyone but the outer class to invoke them).
- // Given one BulkTest instance, we can just clone it and reset the
- // method name for every simple test it defines.
+ // it'd be illegal for anyone but the outer class to invoke them).
+ // Given one BulkTest instance, we can just clone it and reset the
+ // method name for every simple test it defines.
/** Path to test data resources */
@@ -273,21 +273,21 @@ class BulkTestSuiteMaker {
/** List of ignored simple test names. */
private List<String> ignored;
-
+
/** The TestSuite we're currently populating. Can change over time. */
private TestSuite result;
- /**
- * The prefix for simple test methods. Used to check if a test is in
+ /**
+ * The prefix for simple test methods. Used to check if a test is in
* the ignored list.
- */
+ */
private String prefix;
- /**
+ /**
* Constructor.
*
* @param startingClass the starting class
- */
+ */
public BulkTestSuiteMaker(final Class<? extends BulkTest> startingClass) {
this.startingClass = startingClass;
}
@@ -364,7 +364,7 @@ class BulkTestSuiteMaker {
if (ignored.contains(verboseName)) {
return;
}
-
+
BulkTest bulk2;
try {
bulk2 = (BulkTest)m.invoke(bulk, (Object[]) null);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -146,7 +146,7 @@ public class CollectionUtilsTest extends
collectionC2 = new LinkedList<Number>(collectionC);
iterableA2 = collectionA2;
iterableB2 = collectionB2;
-
+
collectionD = new ArrayList<Integer>();
collectionD.add(1);
collectionD.add(3);
@@ -438,7 +438,7 @@ public class CollectionUtilsTest extends
return n.longValue() > 3L;
}
};
-
+
final Collection<Number> col = CollectionUtils.subtract(iterableA, collectionC, predicate);
final Map<Number, Integer> freq2 = CollectionUtils.getCardinalityMap(col);
assertEquals(Integer.valueOf(1), freq2.get(1));
@@ -566,14 +566,14 @@ public class CollectionUtilsTest extends
return o.intValue() % 2 == 0 ? Integer.valueOf(0).hashCode() : Integer.valueOf(1).hashCode();
}
};
-
+
assertTrue(CollectionUtils.isEqualCollection(collectionA, collectionA, e));
assertTrue(CollectionUtils.isEqualCollection(collectionA, collB, e));
assertTrue(CollectionUtils.isEqualCollection(collB, collectionA, e));
-
+
final Equator<Number> defaultEquator = DefaultEquator.defaultEquator();
assertFalse(CollectionUtils.isEqualCollection(collectionA, collectionB, defaultEquator));
- assertFalse(CollectionUtils.isEqualCollection(collectionA, collB, defaultEquator));
+ assertFalse(CollectionUtils.isEqualCollection(collectionA, collB, defaultEquator));
}
@Test(expected=IllegalArgumentException.class)
@@ -654,7 +654,7 @@ public class CollectionUtilsTest extends
// null should be OK
CollectionUtils.forAllDo(col.iterator(), testClosure);
}
-
+
@Test(expected = FunctorException.class)
public void forAllDoFailure() {
final Closure<String> testClosure = ClosureUtils.invokerClosure("clear");
@@ -713,11 +713,11 @@ public class CollectionUtilsTest extends
List<? extends Number> lastElement = CollectionUtils.forAllButLastDo(col.iterator(), testClosure);
assertSame(lastElement, collectionB);
assertTrue(collectionA.isEmpty() && !collectionB.isEmpty());
-
+
assertNull(CollectionUtils.forAllButLastDo(col.iterator(), null));
assertNull(CollectionUtils.forAllButLastDo((Collection<?>) null, null));
}
-
+
@Test
public void getFromMap() {
// Unordered map, entries exist
@@ -1099,7 +1099,7 @@ public class CollectionUtilsTest extends
assertEquals(3, (int) ints.get(1));
assertEquals(3, (int) ints.get(2));
}
-
+
@Test
public void filterInverseNullParameters() throws Exception {
final List<Long> longs = Collections.nCopies(4, 10L);
@@ -1515,7 +1515,7 @@ public class CollectionUtilsTest extends
final Collection<Object> collection = new ArrayList<Object>();
assertSame(collection, CollectionUtils.emptyIfNull(collection));
}
-
+
/**
* This test ensures that {@link Iterable}s are supported by {@link CollectionUtils}.
* Specifically, it uses mocks to ensure that if the passed in
@@ -1638,7 +1638,7 @@ public class CollectionUtilsTest extends
expect(iterator.hasNext()).andReturn(true);
expect(iterator.next()).andReturn(t);
}
-
+
@Test(expected=IllegalArgumentException.class)
public void collateException1() {
CollectionUtils.collate(collectionA, null);
@@ -1660,7 +1660,7 @@ public class CollectionUtilsTest extends
List<Integer> result1 = CollectionUtils.collate(collectionD, collectionE);
List<Integer> result2 = CollectionUtils.collate(collectionE, collectionD);
assertEquals("Merge two lists 1", result1, result2);
-
+
List<Integer> combinedList = new ArrayList<Integer>();
combinedList.addAll(collectionD);
combinedList.addAll(collectionE);
@@ -1683,13 +1683,13 @@ public class CollectionUtilsTest extends
assertEquals("Comparator Merge two lists 1", result1, result2);
assertEquals("Comparator Merge two lists 2", combinedList, result2);
}
-
+
@Test
public void testCollateIgnoreDuplicates() {
List<Integer> result1 = CollectionUtils.collate(collectionD, collectionE, false);
List<Integer> result2 = CollectionUtils.collate(collectionE, collectionD, false);
assertEquals("Merge two lists 1 - ignore duplicates", result1, result2);
-
+
Set<Integer> combinedSet = new HashSet<Integer>();
combinedSet.addAll(collectionD);
combinedSet.addAll(collectionE);
@@ -1698,17 +1698,17 @@ public class CollectionUtilsTest extends
assertEquals("Merge two lists 2 - ignore duplicates", combinedList, result2);
}
-
+
@Test(expected=NullPointerException.class)
public void testPermutationsWithNullCollection() {
CollectionUtils.permutations(null);
}
-
+
@Test
public void testPermutations() {
List<Integer> sample = collectionA.subList(0, 5);
Collection<List<Integer>> permutations = CollectionUtils.permutations(sample);
-
+
// result size = n!
int collSize = sample.size();
int factorial = 1;
@@ -1717,5 +1717,5 @@ public class CollectionUtilsTest extends
}
assertEquals(factorial, permutations.size());
}
-
+
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -37,7 +37,7 @@ public class EnumerationUtilsTest extend
}
public static final String TO_LIST_FIXTURE = "this is a test";
-
+
public void testToListWithStringTokenizer() {
final List<String> expectedList1 = new ArrayList<String>();
final StringTokenizer st = new StringTokenizer(TO_LIST_FIXTURE);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -64,7 +64,7 @@ public class IteratorUtilsTest extends B
list.add(Integer.valueOf(1));
list.add(Integer.valueOf(2));
final Iterator<Integer> iterator = list.iterator();
-
+
final Iterable<Integer> iterable = IteratorUtils.asIterable(iterator);
int expected = 0;
for(final Integer actual : iterable) {
@@ -77,7 +77,7 @@ public class IteratorUtilsTest extends B
// single use iterator
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
}
-
+
public void testAsIterableNull() {
try {
IteratorUtils.asIterable(null);
@@ -93,7 +93,7 @@ public class IteratorUtilsTest extends B
list.add(Integer.valueOf(1));
list.add(Integer.valueOf(2));
final Iterator<Integer> iterator = list.iterator();
-
+
final Iterable<Integer> iterable = IteratorUtils.asMultipleUseIterable(iterator);
int expected = 0;
for(final Integer actual : iterable) {
@@ -121,7 +121,7 @@ public class IteratorUtilsTest extends B
// success
}
}
-
+
public void testToList() {
final List<Object> list = new ArrayList<Object>();
list.add(Integer.valueOf(1));
@@ -801,7 +801,7 @@ public class IteratorUtilsTest extends B
public void testNodeListIterator() {
final Node[] nodes = createNodes();
final NodeList nodeList = createNodeList(nodes);
-
+
final Iterator<Node> iterator = IteratorUtils.nodeListIterator(nodeList);
int expectedNodeIndex = 0;
for (final Node actual : IteratorUtils.asIterable(iterator)) {
@@ -824,7 +824,7 @@ public class IteratorUtilsTest extends B
final Node parentNode = createMock(Node.class);
expect(parentNode.getChildNodes()).andStubReturn(nodeList);
replay(parentNode);
-
+
final Iterator<Node> iterator = IteratorUtils.nodeListIterator(parentNode);
int expectedNodeIndex = 0;
for (final Node actual : IteratorUtils.asIterable(iterator)) {
@@ -838,10 +838,10 @@ public class IteratorUtilsTest extends B
// single use iterator
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
}
-
+
/**
* creates an array of four Node instances, mocked by EasyMock.
- * @return
+ * @return
*/
private Node[] createNodes() {
final Node node1 = createMock(Node.class);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -170,14 +170,14 @@ public class ListUtilsTest extends BulkT
public void testEmptyIfNull() {
assertTrue(ListUtils.emptyIfNull(null).isEmpty());
-
+
final List<Long> list = new ArrayList<Long>();
assertSame(list, ListUtils.emptyIfNull(list));
}
public void testDefaultIfNull() {
assertTrue(ListUtils.defaultIfNull(null, Collections.emptyList()).isEmpty());
-
+
final List<Long> list = new ArrayList<Long>();
assertSame(list, ListUtils.defaultIfNull(list, Collections.<Long>emptyList()));
}
@@ -260,14 +260,14 @@ public class ListUtilsTest extends BulkT
final List<String> result = ListUtils.subtract(list, sub);
assertTrue(result.size() == 3);
-
+
final List<String> expected = new ArrayList<String>();
expected.add(b);
expected.add(a);
expected.add(x);
assertEquals(expected, result);
-
+
try {
ListUtils.subtract(list, null);
fail("expecting NullPointerException");
@@ -286,7 +286,7 @@ public class ListUtilsTest extends BulkT
final List<String> result = ListUtils.subtract(list, sub);
assertTrue(result.size() == 3);
-
+
final List<String> expected = new ArrayList<String>();
expected.add(a);
expected.add(null);
@@ -306,13 +306,13 @@ public class ListUtilsTest extends BulkT
testPredicate = EqualPredicate.equalPredicate("de");
index = ListUtils.indexOf(fullList, testPredicate);
assertEquals(index, -1);
-
+
assertEquals(ListUtils.indexOf(null,testPredicate), -1);
assertEquals(ListUtils.indexOf(fullList, null), -1);
}
-
+
public void testLongestCommonSubsequence() {
-
+
try {
ListUtils.longestCommonSubsequence((List<?>) null, null);
fail("failed to check for null argument");
@@ -335,24 +335,24 @@ public class ListUtilsTest extends BulkT
List<Character> list1 = Arrays.asList('B', 'A', 'N', 'A', 'N', 'A');
List<Character> list2 = Arrays.asList('A', 'N', 'A', 'N', 'A', 'S');
lcs = ListUtils.longestCommonSubsequence(list1, list2);
-
+
List<Character> expected = Arrays.asList('A', 'N', 'A', 'N', 'A');
assertEquals(expected, lcs);
List<Character> list3 = Arrays.asList('A', 'T', 'A', 'N', 'A');
lcs = ListUtils.longestCommonSubsequence(list1, list3);
-
+
expected = Arrays.asList('A', 'A', 'N', 'A');
assertEquals(expected, lcs);
List<Character> listZorro = Arrays.asList('Z', 'O', 'R', 'R', 'O');
lcs = ListUtils.longestCommonSubsequence(list1, listZorro);
-
+
assertTrue(lcs.isEmpty());
}
public void testLongestCommonSubsequenceWithString() {
-
+
try {
ListUtils.longestCommonSubsequence((String) null, null);
fail("failed to check for null argument");
@@ -374,17 +374,17 @@ public class ListUtilsTest extends BulkT
String banana = "BANANA";
String ananas = "ANANAS";
lcs = ListUtils.longestCommonSubsequence(banana, ananas);
-
+
assertEquals("ANANA", lcs);
String atana = "ATANA";
lcs = ListUtils.longestCommonSubsequence(banana, atana);
-
+
assertEquals("AANA", lcs);
String zorro = "ZORRO";
lcs = ListUtils.longestCommonSubsequence(banana, zorro);
-
+
assertEquals(0, lcs.length());
}
@@ -393,30 +393,30 @@ public class ListUtilsTest extends BulkT
for (int i = 0; i <= 6; i++) {
strings.add(i);
}
-
+
final List<List<Integer>> partition = ListUtils.partition(strings, 3);
assertNotNull(partition);
assertEquals(3, partition.size());
assertEquals(1, partition.get(2).size());
-
+
try {
ListUtils.partition(null, 3);
fail("failed to check for null argument");
} catch (final IllegalArgumentException e) {}
-
+
try {
ListUtils.partition(strings, 0);
fail("failed to check for size argument");
} catch (final IllegalArgumentException e) {}
-
+
try {
ListUtils.partition(strings, -10);
fail("failed to check for size argument");
} catch (final IllegalArgumentException e) {}
-
+
}
-
+
private static Predicate<Number> EQUALS_TWO = new Predicate<Number>() {
public boolean evaluate(final Number input) {
return input.intValue() == 2;
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapPerformance.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapPerformance.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapPerformance.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapPerformance.java Tue Apr 30 14:27:35 2013
@@ -25,23 +25,23 @@ import java.util.Set;
import org.apache.commons.collections4.map.Flat3Map;
-/**
+/**
* <code>MapPerformanceTest</code> is designed to perform basic Map performance tests.
- *
+ *
* @version $Id$
*/
public class MapPerformance {
- /** The total number of runs for each test */
+ /** The total number of runs for each test */
private static final int RUNS = 20000000;
-
+
/**
* Main method
*/
public static void main(final String[] args) {
testAll();
}
-
+
private static void testAll() {
final Map<String, String> dummyMap = new DummyMap<String, String>();
final Map<String, String> hashMap = new HashMap<String, String>();
@@ -59,7 +59,7 @@ public class MapPerformance {
// Map bucketMap = new StaticBucketMap();
// bucketMap.putAll(hashMap);
// Map doubleMap = new DoubleOrderedMap(hashMap);
-
+
// dummy is required as the VM seems to hotspot the first call to the
// test method with the given type
test(dummyMap, " Dummy ");
@@ -67,43 +67,43 @@ public class MapPerformance {
test(dummyMap, " Dummy ");
test(flatMap, " Flat3 ");
test(hashMap, " HashMap ");
-
+
test(flatMap, " Flat3 ");
test(flatMap, " Flat3 ");
test(flatMap, " Flat3 ");
-
+
test(hashMap, " HashMap ");
test(hashMap, " HashMap ");
test(hashMap, " HashMap ");
-
+
// test(treeMap, " TreeMap ");
// test(treeMap, " TreeMap ");
// test(treeMap, " TreeMap ");
-
+
// test(unmodHashMap, "Unmod(HashMap) ");
// test(unmodHashMap, "Unmod(HashMap) ");
// test(unmodHashMap, "Unmod(HashMap) ");
-//
+//
// test(syncMap, " Sync(HashMap) ");
// test(syncMap, " Sync(HashMap) ");
// test(syncMap, " Sync(HashMap) ");
-//
+//
// test(fastHashMap, " FastHashMap ");
// test(fastHashMap, " FastHashMap ");
// test(fastHashMap, " FastHashMap ");
-//
+//
// test(seqMap, " SeqHashMap ");
// test(seqMap, " SeqHashMap ");
// test(seqMap, " SeqHashMap ");
-//
+//
// test(linkedMap, " LinkedHashMap ");
// test(linkedMap, " LinkedHashMap ");
// test(linkedMap, " LinkedHashMap ");
-//
+//
// test(bucketMap, " BucketMap ");
// test(bucketMap, " BucketMap ");
// test(bucketMap, " BucketMap ");
-//
+//
// test(doubleMap, " DoubleMap ");
// test(doubleMap, " DoubleMap ");
// test(doubleMap, " DoubleMap ");
@@ -169,6 +169,6 @@ public class MapPerformance {
return null;
}
}
-
+
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -715,14 +715,14 @@ public class MapUtilsTest extends BulkTe
}
//-----------------------------------------------------------------------
-
+
public void testEmptyIfNull() {
assertTrue(MapUtils.emptyIfNull(null).isEmpty());
-
+
final Map<Long, Long> map = new HashMap<Long, Long>();
assertSame(map, MapUtils.emptyIfNull(map));
}
-
+
public void testIsEmptyWithEmptyMap() {
final Map<Object, Object> map = new HashMap<Object, Object>();
assertEquals(true, MapUtils.isEmpty(map));
@@ -792,7 +792,7 @@ public class MapUtilsTest extends BulkTe
}
/**
- * Test class for populateMap(MultiMap).
+ * Test class for populateMap(MultiMap).
*/
public static class X implements Comparable<X> {
int key;
@@ -806,7 +806,7 @@ public class MapUtilsTest extends BulkTe
public int compareTo(X o) {
return key - o.key;
}
-
+
}
public void testPopulateMultiMap() {
@@ -814,7 +814,7 @@ public class MapUtilsTest extends BulkTe
final List<X> list = new ArrayList<X>();
list.add(new X(1, "x1"));
list.add(new X(2, "x2"));
- list.add(new X(2, "x3"));
+ list.add(new X(2, "x3"));
list.add(new X(5, "x4"));
list.add(new X(5, "x5"));
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java Tue Apr 30 14:27:35 2013
@@ -69,11 +69,11 @@ public class SetUtilsTest extends BulkTe
public void testEmptyIfNull() {
assertTrue(SetUtils.emptyIfNull(null).isEmpty());
-
+
final Set<Long> set = new HashSet<Long>();
assertSame(set, SetUtils.emptyIfNull(set));
}
-
+
public void testEquals() {
final Collection<String> data = Arrays.asList( new String[] { "a", "b", "c" });
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java Tue Apr 30 14:27:35 2013
@@ -48,7 +48,7 @@ public abstract class AbstractBagTest<T>
/**
* JUnit constructor.
- *
+ *
* @param testName the test class name
*/
public AbstractBagTest(final String testName) {
@@ -58,7 +58,7 @@ public abstract class AbstractBagTest<T>
//-----------------------------------------------------------------------
/**
* Return a new, empty bag to used for testing.
- *
+ *
* @return the bag to be tested
*/
@Override
@@ -128,22 +128,22 @@ public abstract class AbstractBagTest<T>
assertEquals("Should have count of 1", 1, bag.getCount("C"));
assertEquals("Should have count of 2", 2, bag.size());
}
-
+
@SuppressWarnings("unchecked")
public void testContains() {
final Bag<T> bag = makeObject();
-
+
assertEquals("Bag does not have at least 1 'A'", false, bag.contains("A"));
assertEquals("Bag does not have at least 1 'B'", false, bag.contains("B"));
-
+
bag.add((T) "A"); // bag 1A
assertEquals("Bag has at least 1 'A'", true, bag.contains("A"));
assertEquals("Bag does not have at least 1 'B'", false, bag.contains("B"));
-
+
bag.add((T) "A"); // bag 2A
assertEquals("Bag has at least 1 'A'", true, bag.contains("A"));
assertEquals("Bag does not have at least 1 'B'", false, bag.contains("B"));
-
+
bag.add((T) "B"); // bag 2A,1B
assertEquals("Bag has at least 1 'A'", true, bag.contains("A"));
assertEquals("Bag has at least 1 'B'", true, bag.contains("B"));
@@ -163,34 +163,34 @@ public abstract class AbstractBagTest<T>
final List<String> known1A1B = new ArrayList<String>();
known1A1B.add("A");
known1A1B.add("B");
-
+
assertEquals("Bag containsAll of empty", true, bag.containsAll(known));
assertEquals("Bag does not containsAll of 1 'A'", false, bag.containsAll(known1A));
assertEquals("Bag does not containsAll of 2 'A'", false, bag.containsAll(known2A));
assertEquals("Bag does not containsAll of 1 'B'", false, bag.containsAll(known1B));
assertEquals("Bag does not containsAll of 1 'A' 1 'B'", false, bag.containsAll(known1A1B));
-
+
bag.add((T) "A"); // bag 1A
assertEquals("Bag containsAll of empty", true, bag.containsAll(known));
assertEquals("Bag containsAll of 1 'A'", true, bag.containsAll(known1A));
assertEquals("Bag does not containsAll of 2 'A'", false, bag.containsAll(known2A));
assertEquals("Bag does not containsAll of 1 'B'", false, bag.containsAll(known1B));
assertEquals("Bag does not containsAll of 1 'A' 1 'B'", false, bag.containsAll(known1A1B));
-
+
bag.add((T) "A"); // bag 2A
assertEquals("Bag containsAll of empty", true, bag.containsAll(known));
assertEquals("Bag containsAll of 1 'A'", true, bag.containsAll(known1A));
assertEquals("Bag containsAll of 2 'A'", true, bag.containsAll(known2A));
assertEquals("Bag does not containsAll of 1 'B'", false, bag.containsAll(known1B));
assertEquals("Bag does not containsAll of 1 'A' 1 'B'", false, bag.containsAll(known1A1B));
-
+
bag.add((T) "A"); // bag 3A
assertEquals("Bag containsAll of empty", true, bag.containsAll(known));
assertEquals("Bag containsAll of 1 'A'", true, bag.containsAll(known1A));
assertEquals("Bag containsAll of 2 'A'", true, bag.containsAll(known2A));
assertEquals("Bag does not containsAll of 1 'B'", false, bag.containsAll(known1B));
assertEquals("Bag does not containsAll of 1 'A' 1 'B'", false, bag.containsAll(known1A1B));
-
+
bag.add((T) "B"); // bag 3A1B
assertEquals("Bag containsAll of empty", true, bag.containsAll(known));
assertEquals("Bag containsAll of 1 'A'", true, bag.containsAll(known1A));
@@ -219,7 +219,7 @@ public abstract class AbstractBagTest<T>
bag.remove("B");
assertEquals("Should have 1 total item", 1, bag.size());
}
-
+
@SuppressWarnings("unchecked")
public void testRetainAll() {
final Bag<T> bag = makeObject();
@@ -244,7 +244,7 @@ public abstract class AbstractBagTest<T>
bag.add((T) "B");
assertEquals("Bag should have 3 items", 3, bag.size());
final Iterator<T> i = bag.iterator();
-
+
boolean foundA = false;
while (i.hasNext()) {
final String element = (String) i.next();
@@ -257,7 +257,7 @@ public abstract class AbstractBagTest<T>
}
}
}
-
+
assertTrue("Bag should still contain 'A'", bag.contains("A"));
assertEquals("Bag should have 2 items", 2, bag.size());
assertEquals("Bag should have 1 'A'", 1, bag.getCount("A"));
@@ -279,7 +279,7 @@ public abstract class AbstractBagTest<T>
// expected
}
}
-
+
@SuppressWarnings("unchecked")
public void testIteratorFailNoMore() {
final Bag<T> bag = makeObject();
@@ -297,7 +297,7 @@ public abstract class AbstractBagTest<T>
// expected
}
}
-
+
@SuppressWarnings("unchecked")
public void testIteratorFailDoubleRemove() {
final Bag<T> bag = makeObject();
@@ -321,7 +321,7 @@ public abstract class AbstractBagTest<T>
it.remove();
assertEquals(1, bag.size());
}
-
+
@SuppressWarnings("unchecked")
public void testIteratorRemoveProtectsInvariants() {
final Bag<T> bag = makeObject();
@@ -339,11 +339,11 @@ public abstract class AbstractBagTest<T>
it.remove();
assertEquals(0, bag.size());
assertEquals(false, it.hasNext());
-
+
final Iterator<T> it2 = bag.iterator();
assertEquals(false, it2.hasNext());
}
-
+
@SuppressWarnings("unchecked")
public void testToArray() {
final Bag<T> bag = makeObject();
@@ -443,7 +443,7 @@ public abstract class AbstractBagTest<T>
bag2.add((T) "B");
bag2.add((T) "C");
assertEquals(bag.hashCode(), bag2.hashCode());
-
+
int total = 0;
total += "A".hashCode() ^ 2;
total += "B".hashCode() ^ 2;
@@ -458,7 +458,7 @@ public abstract class AbstractBagTest<T>
if (!(bag instanceof Serializable && isTestSerialization())) {
return;
}
-
+
final byte[] objekt = writeExternalFormToBytes((Serializable) bag);
final Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
@@ -478,7 +478,7 @@ public abstract class AbstractBagTest<T>
if (!(bag instanceof Serializable && isTestSerialization())) {
return;
}
-
+
final byte[] objekt = writeExternalFormToBytes((Serializable) bag);
final Bag<?> bag2 = (Bag<?>) readExternalFormFromBytes(objekt);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/HashBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/HashBagTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/HashBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/HashBagTest.java Tue Apr 30 14:27:35 2013
@@ -26,7 +26,7 @@ import org.apache.commons.collections4.b
* @version $Id$
*/
public class HashBagTest<T> extends AbstractBagTest<T> {
-
+
public HashBagTest(final String testName) {
super(testName);
}
@@ -35,12 +35,12 @@ public class HashBagTest<T> extends Abst
public Bag<T> makeObject() {
return new HashBag<T>();
}
-
+
@Override
public String getCompatibilityVersion() {
return "4";
}
-
+
// public void testCreate() throws Exception {
// Bag bag = makeObject();
// writeExternalFormToDisk((java.io.Serializable) bag, "src/test/resources/data/test/HashBag.emptyCollection.version4.obj");
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java Tue Apr 30 14:27:35 2013
@@ -74,7 +74,7 @@ public class TransformedBagTest<T> exten
assertEquals(true, bag.contains(Integer.valueOf((String) el)));
assertEquals(false, bag.contains(el));
}
-
+
assertEquals(false, bag.remove(els[0]));
assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java Tue Apr 30 14:27:35 2013
@@ -69,7 +69,7 @@ public class TransformedSortedBagTest<T>
for (final Object el : els) {
assertEquals(true, bag.contains(Integer.valueOf((String) el)));
}
-
+
assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TreeBagTest.java Tue Apr 30 14:27:35 2013
@@ -56,7 +56,7 @@ public class TreeBagTest<T> extends Abst
// expected;
}
}
-
+
public void testOrdering() {
final Bag<T> bag = setupBag();
assertEquals("Should get elements in correct order", "A", bag.toArray()[0]);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualHashBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualHashBidiMapTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualHashBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualHashBidiMapTest.java Tue Apr 30 14:27:35 2013
@@ -51,7 +51,7 @@ public class DualHashBidiMapTest<K, V> e
public String[] ignoredTests() {
return new String[] { "DualHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}
-
+
// public void testCreate() throws Exception {
// resetEmpty();
// writeExternalFormToDisk((java.io.Serializable) map, "src/test/resources/data/test/DualHashBidiMap.emptyCollection.version4.obj");
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualLinkedHashBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualLinkedHashBidiMapTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualLinkedHashBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualLinkedHashBidiMapTest.java Tue Apr 30 14:27:35 2013
@@ -56,7 +56,7 @@ public class DualLinkedHashBidiMapTest<K
public String[] ignoredTests() {
return new String[] { "DualLinkedHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}
-
+
// public void testCreate() throws Exception {
// resetEmpty();
// writeExternalFormToDisk((java.io.Serializable) map, "src/test/resources/data/test/DualLinkedHashBidiMap.emptyCollection.version4.obj");
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMap2Test.java Tue Apr 30 14:27:35 2013
@@ -77,7 +77,7 @@ public class DualTreeBidiMap2Test<K exte
dtbm.put("one", 1);
assertEquals("one", dtbm.firstKey());
assertEquals("two", dtbm.lastKey());
-
+
}
public void testSerializeDeserializeCheckComparator() throws Exception {
@@ -159,10 +159,10 @@ public class DualTreeBidiMap2Test<K exte
// there are several bugs in the following JVM:
// IBM J9 VM build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_126067
// thus disabling tests related to these bugs
-
+
final String vmName = System.getProperty("java.vm.name");
final String version = System.getProperty("java.version");
-
+
if (vmName == null || version == null) {
return new String[] { recursiveTest };
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMapTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/DualTreeBidiMapTest.java Tue Apr 30 14:27:35 2013
@@ -54,10 +54,10 @@ public class DualTreeBidiMapTest<K exten
// there are several bugs in the following JVM:
// IBM J9 VM build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_126067
// thus disabling tests related to these bugs
-
+
final String vmName = System.getProperty("java.vm.name");
final String version = System.getProperty("java.version");
-
+
if (vmName == null || version == null) {
return new String[] { recursiveTest };
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/TreeBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/TreeBidiMapTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/TreeBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/TreeBidiMapTest.java Tue Apr 30 14:27:35 2013
@@ -42,7 +42,7 @@ public class TreeBidiMapTest<K extends C
public BidiMap<K, V> makeObject() {
return new TreeBidiMap<K, V>();
}
-
+
@Override
public TreeMap<K, V> makeConfirmedMap() {
return new TreeMap<K, V>();
@@ -55,22 +55,22 @@ public class TreeBidiMapTest<K extends C
public String[] ignoredTests() {
return new String[] {"TreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}
-
+
@Override
public boolean isAllowNullKey() {
return false;
}
-
+
@Override
public boolean isAllowNullValue() {
return false;
}
-
+
@Override
public boolean isSetValueSupported() {
return false;
}
-
+
@Override
public String getCompatibilityVersion() {
return "4";
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java Tue Apr 30 14:27:35 2013
@@ -128,7 +128,7 @@ public class CompositeCollectionTest<E>
protected void setUpMutatorTest() {
setUpTest();
c.setMutator(new CompositeCollection.CollectionMutator<E>() {
-
+
public boolean add(final CompositeCollection<E> composite, final List<Collection<E>> collections, final E obj) {
for (final Collection<E> coll : collections) {
coll.add(obj);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/IndexedCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/IndexedCollectionTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/IndexedCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/IndexedCollectionTest.java Tue Apr 30 14:27:35 2013
@@ -28,7 +28,7 @@ import org.apache.commons.collections4.T
import org.apache.commons.collections4.collection.IndexedCollection;
/**
- * Extension of {@link AbstractCollectionTest} for exercising the
+ * Extension of {@link AbstractCollectionTest} for exercising the
* {@link IndexedCollection} implementation.
*
* @since 4.0
@@ -58,7 +58,7 @@ public class IndexedCollectionTest exten
return Integer.valueOf(input);
}
}
-
+
@Override
public Collection<String> makeObject() {
return decorateCollection(new ArrayList<String>());
@@ -100,7 +100,7 @@ public class IndexedCollectionTest exten
public Collection<String> makeUniqueTestCollection() {
return decorateUniqueCollection(new ArrayList<String>());
}
-
+
@Override
protected boolean skipSerializedCanonicalTests() {
// FIXME: support canonical tests
@@ -115,7 +115,7 @@ public class IndexedCollectionTest exten
coll.add("16");
coll.add("1");
coll.addAll(asList("2","3","4"));
-
+
@SuppressWarnings("unchecked")
final IndexedCollection<Integer, String> indexed = (IndexedCollection<Integer, String>) coll;
assertEquals("12", indexed.get(12));
@@ -125,7 +125,7 @@ public class IndexedCollectionTest exten
assertEquals("3", indexed.get(3));
assertEquals("4", indexed.get(4));
}
-
+
public void testEnsureDuplicateObjectsCauseException() throws Exception {
final Collection<String> coll = makeUniqueTestCollection();
@@ -137,20 +137,20 @@ public class IndexedCollectionTest exten
// expected
}
}
-
+
public void testDecoratedCollectionIsIndexedOnCreation() throws Exception {
final Collection<String> original = makeFullCollection();
final IndexedCollection<Integer, String> indexed = decorateUniqueCollection(original);
-
+
assertEquals("1", indexed.get(1));
assertEquals("2", indexed.get(2));
assertEquals("3", indexed.get(3));
}
-
+
public void testReindexUpdatesIndexWhenDecoratedCollectionIsModifiedSeparately() throws Exception {
final Collection<String> original = new ArrayList<String>();
final IndexedCollection<Integer, String> indexed = decorateUniqueCollection(original);
-
+
original.add("1");
original.add("2");
original.add("3");
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java Tue Apr 30 14:27:35 2013
@@ -33,13 +33,13 @@ import org.apache.commons.collections4.c
* @version $Id$
*/
public class TransformedCollectionTest extends AbstractCollectionTest<Object> {
-
+
private static class StringToInteger implements Transformer<Object, Object> {
public Object transform(final Object input) {
return Integer.valueOf((String) input);
}
}
-
+
public static final Transformer<Object, Object> NOOP_TRANSFORMER = TransformerUtils.nopTransformer();
public static final Transformer<Object, Object> STRING_TO_INTEGER_TRANSFORMER = new StringToInteger();
@@ -59,7 +59,7 @@ public class TransformedCollectionTest e
list.addAll(Arrays.asList(getFullElements()));
return list;
}
-
+
@Override
public Collection<Object> makeObject() {
return TransformedCollection.transformingCollection(new ArrayList<Object>(), NOOP_TRANSFORMER);
@@ -71,7 +71,7 @@ public class TransformedCollectionTest e
list.addAll(Arrays.asList(getFullElements()));
return TransformedCollection.transformingCollection(list, NOOP_TRANSFORMER);
}
-
+
//-----------------------------------------------------------------------
@Override
public Object[] getFullElements() {
@@ -94,7 +94,7 @@ public class TransformedCollectionTest e
assertEquals(true, coll.contains(Integer.valueOf((String) els[i])));
assertEquals(false, coll.contains(els[i]));
}
-
+
assertEquals(true, coll.remove(Integer.valueOf((String) els[0])));
}
@@ -110,7 +110,7 @@ public class TransformedCollectionTest e
assertEquals(true, collection.contains(Integer.valueOf((String) el)));
assertEquals(false, collection.contains(el));
}
-
+
assertEquals(false, collection.remove(els[0]));
assertEquals(true, collection.remove(Integer.valueOf((String) els[0])));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractComparatorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractComparatorTest.java Tue Apr 30 14:27:35 2013
@@ -37,7 +37,7 @@ public abstract class AbstractComparator
/**
* JUnit constructor.
- *
+ *
* @param testName the test class name
*/
public AbstractComparatorTest(final String testName) {
@@ -45,10 +45,10 @@ public abstract class AbstractComparator
}
//-----------------------------------------------------------------------
-
+
/**
* Implement this method to return a list of sorted objects.
- *
+ *
* @return sorted objects
*/
public abstract List<T> getComparableObjectsOrdered();
@@ -56,7 +56,7 @@ public abstract class AbstractComparator
//-----------------------------------------------------------------------
/**
* Implements the abstract superclass method to return the comparator.
- *
+ *
* @return a full iterator
*/
@Override
@@ -144,7 +144,7 @@ public abstract class AbstractComparator
final List<T> orderedList = getComparableObjectsOrdered();
- /* debug
+ /* debug
Iterator i = randomList.iterator();
while (i.hasNext()) {
System.out.println(i.next());
@@ -187,14 +187,14 @@ public abstract class AbstractComparator
public void testComparatorCompatibility() throws IOException, ClassNotFoundException {
if (!skipSerializedCanonicalTests()) {
Comparator<T> comparator = null;
-
+
// test to make sure the canonical form has been preserved
try {
comparator = (Comparator<T>) readExternalFormFromDisk(getCanonicalComparatorName(makeObject()));
} catch (final FileNotFoundException exception) {
-
+
final boolean autoCreateSerialized = false;
-
+
if (autoCreateSerialized) {
comparator = makeObject();
final String fileName = getCanonicalComparatorName(comparator);
@@ -206,16 +206,16 @@ public abstract class AbstractComparator
+ "compatibility: " + exception.getMessage());
}
}
-
-
+
+
// make sure the canonical form produces the ordering we currently
// expect
final List<T> randomList = getComparableObjectsOrdered();
reverseObjects(randomList);
sortObjects(randomList, comparator);
-
+
final List<T> orderedList = getComparableObjectsOrdered();
-
+
assertTrue("Comparator did not reorder the List correctly",
orderedList.equals(randomList));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java Tue Apr 30 14:27:35 2013
@@ -73,7 +73,7 @@ public abstract class AbstractNullCompar
public String getCanonicalComparatorName(final Object object) {
return super.getCanonicalComparatorName(object) + "1";
}
-
+
@Override
public String getCompatibilityVersion() {
return "4";
@@ -82,7 +82,7 @@ public abstract class AbstractNullCompar
// public void testCreate() throws Exception {
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/NullComparator.version4.obj1");
// }
-
+
}
/**
@@ -115,7 +115,7 @@ public abstract class AbstractNullCompar
public String getCanonicalComparatorName(final Object object) {
return super.getCanonicalComparatorName(object) + "2";
}
-
+
@Override
public String getCompatibilityVersion() {
return "4";
@@ -124,6 +124,6 @@ public abstract class AbstractNullCompar
// public void testCreate() throws Exception {
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/NullComparator.version4.obj2");
// }
-
+
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java Tue Apr 30 14:27:35 2013
@@ -52,7 +52,7 @@ public class ComparatorChainTest extends
// public void testCreate() throws Exception {
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/ComparatorChain.version4.obj");
// }
-
+
@Test
public void testNoopComparatorChain() {
final ComparatorChain<Integer> chain = new ComparatorChain<Integer>();
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/FixedOrderComparatorTest.java Tue Apr 30 14:27:35 2013
@@ -79,7 +79,7 @@ public class FixedOrderComparatorTest ex
// public void testCreate() throws Exception {
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/FixedOrderComparator.version4.obj");
// }
-
+
//
// The tests
//
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java Tue Apr 30 14:27:35 2013
@@ -63,7 +63,7 @@ public class ReverseComparatorTest exten
// public void testCreate() throws Exception {
// writeExternalFormToDisk((java.io.Serializable) makeObject(), "src/test/resources/data/test/ReverseComparator.version4.obj");
// }
-
+
@Override
public List<Integer> getComparableObjectsOrdered() {
final List<Integer> list = new LinkedList<Integer>();
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractMockPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -38,7 +38,7 @@ public abstract class AbstractMockPredic
* Mock predicates created by a single test case which need to be verified after the test completes.
*/
private List<Predicate<? super T>> mockPredicatesToVerify;
-
+
/**
* The value to pass to mocks.
*/
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -32,7 +32,7 @@ public abstract class AbstractPredicateT
cString = "Hello";
cInteger = Integer.valueOf(6);
}
-
+
@Test
public void predicateSanityTests() throws Exception {
final Predicate<?> predicate = generatePredicate();
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AllPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -53,7 +53,7 @@ public class AllPredicateTest extends Ab
/**
* {@inheritDoc}
- */
+ */
@Override
protected final Predicate<Integer> getPredicateInstance(final Collection<Predicate<Integer>> predicates) {
return AllPredicate.allPredicate(predicates);
@@ -87,7 +87,7 @@ public class AllPredicateTest extends Ab
// use the constructor directly, as getInstance() returns the original predicate when passed
// an array of size one.
final Predicate<Integer> predicate = createMockPredicate(true);
-
+
assertTrue("single true predicate evaluated to false",
allPredicate(predicate).evaluate(getTestValue()));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java Tue Apr 30 14:27:35 2013
@@ -59,7 +59,7 @@ public class CatchAndRethrowClosureTest
protected <T> Closure<T> generateClosure() {
return generateNoExceptionClosure();
}
-
+
@Test
public void testThrowingClosure() {
Closure<Integer> closure = generateNoExceptionClosure();
@@ -70,7 +70,7 @@ public class CatchAndRethrowClosureTest
} catch (final RuntimeException ex) {
Assert.fail();
}
-
+
closure = generateIOExceptionClosure();
try {
closure.execute(Integer.valueOf(0));
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/ComparatorPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/ComparatorPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/ComparatorPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/ComparatorPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -75,9 +75,9 @@ public class ComparatorPredicateTest ext
assertTrue(p, Integer.valueOf(value.intValue()));
assertTrue(p, Integer.valueOf(value.intValue() + 1));
}
-
+
@Override
protected Predicate<?> generatePredicate() {
return comparatorPredicate(Integer.valueOf(10), new TestComparator<Integer>());
- }
+ }
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/EqualPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/EqualPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/EqualPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/EqualPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -32,19 +32,19 @@ public class EqualPredicateTest extends
protected Predicate<Object> generatePredicate() {
return equalPredicate(null);
}
-
+
@Test
public void testNullArgumentEqualsNullPredicate() throws Exception {
assertSame(nullPredicate(), equalPredicate(null));
}
-
+
@Test
public void objectFactoryUsesEqualsForTest() throws Exception {
final Predicate<EqualsTestObject> predicate = equalPredicate(FALSE_OBJECT);
assertFalse(predicate, FALSE_OBJECT);
assertTrue(equalPredicate(TRUE_OBJECT), TRUE_OBJECT);
}
-
+
@SuppressWarnings("boxing")
@Test
public void testPredicateTypeCanBeSuperClassOfObject() throws Exception {
@@ -58,7 +58,7 @@ public class EqualPredicateTest extends
public EqualsTestObject(final boolean b) {
this.b = b;
}
-
+
@Override
public boolean equals(final Object obj) {
return b;
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/NullPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/NullPredicateTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/NullPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/NullPredicateTest.java Tue Apr 30 14:27:35 2013
@@ -30,7 +30,7 @@ public class NullPredicateTest extends A
assertSame(NullPredicate.nullPredicate(), NullPredicate.nullPredicate());
assertTrue(nullPredicate(), null);
}
-
+
public void ensurePredicateCanBeTypedWithoutWarning() throws Exception {
final Predicate<String> predicate = NullPredicate.nullPredicate();
assertFalse(predicate, cString);
@@ -39,5 +39,5 @@ public class NullPredicateTest extends A
@Override
protected Predicate<?> generatePredicate() {
return nullPredicate();
- }
+ }
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/AbstractIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/AbstractIteratorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/AbstractIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/AbstractIteratorTest.java Tue Apr 30 14:27:35 2013
@@ -36,7 +36,7 @@ public abstract class AbstractIteratorTe
/**
* JUnit constructor.
- *
+ *
* @param testName the test class name
*/
public AbstractIteratorTest(final String testName) {
@@ -46,14 +46,14 @@ public abstract class AbstractIteratorTe
//-----------------------------------------------------------------------
/**
* Implement this method to return an iterator over an empty collection.
- *
+ *
* @return an empty iterator
*/
public abstract Iterator<E> makeEmptyIterator();
/**
* Implements the abstract superclass method to return the full iterator.
- *
+ *
* @return a full iterator
*/
@Override
@@ -62,7 +62,7 @@ public abstract class AbstractIteratorTe
/**
* Whether or not we are testing an iterator that can be empty.
* Default is true.
- *
+ *
* @return true if Iterator can be empty
*/
public boolean supportsEmptyIterator() {
@@ -72,7 +72,7 @@ public abstract class AbstractIteratorTe
/**
* Whether or not we are testing an iterator that can contain elements.
* Default is true.
- *
+ *
* @return true if Iterator can be full
*/
public boolean supportsFullIterator() {
@@ -82,7 +82,7 @@ public abstract class AbstractIteratorTe
/**
* Whether or not we are testing an iterator that supports remove().
* Default is true.
- *
+ *
* @return true if Iterator supports remove
*/
public boolean supportsRemove() {
@@ -106,10 +106,10 @@ public abstract class AbstractIteratorTe
}
final Iterator<E> it = makeEmptyIterator();
-
+
// hasNext() should return false
assertEquals("hasNext() should return false for empty iterators", false, it.hasNext());
-
+
// next() should throw a NoSuchElementException
try {
it.next();
@@ -117,7 +117,7 @@ public abstract class AbstractIteratorTe
} catch (final NoSuchElementException e) {
}
verify();
-
+
assertNotNull(it.toString());
}
@@ -153,7 +153,7 @@ public abstract class AbstractIteratorTe
fail("NoSuchElementException must be thrown when Iterator is exhausted");
} catch (final NoSuchElementException e) {
}
-
+
assertNotNull(it.toString());
}
@@ -162,7 +162,7 @@ public abstract class AbstractIteratorTe
*/
public void testRemove() {
final Iterator<E> it = makeObject();
-
+
if (supportsRemove() == false) {
// check for UnsupportedOperationException if not supported
try {
@@ -170,23 +170,23 @@ public abstract class AbstractIteratorTe
} catch (final UnsupportedOperationException ex) {}
return;
}
-
+
// should throw IllegalStateException before next() called
try {
it.remove();
fail();
} catch (final IllegalStateException ex) {}
verify();
-
+
// remove after next should be fine
it.next();
it.remove();
-
+
// should throw IllegalStateException for second remove()
try {
it.remove();
fail();
} catch (final IllegalStateException ex) {}
}
-
+
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIteratorTest.java?rev=1477661&r1=1477660&r2=1477661&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIteratorTest.java Tue Apr 30 14:27:35 2013
@@ -87,7 +87,7 @@ public class ArrayIteratorTest<E> extend
// expected
}
}
-
+
public void testReset() {
final ArrayIterator<E> it = makeObject();
it.next();