Remove trailing white spaces on all lines.

This commit is contained in:
Gary Gregory 2018-06-12 15:32:24 -06:00
parent bbf6533902
commit 56706c8203
2 changed files with 85 additions and 85 deletions

View File

@ -55,7 +55,7 @@ public class MultiSetUtilsTest {
} catch (UnsupportedOperationException e) {
}
}
/**
* Tests {@link MultiSetUtils#unmodifiableMultiSet(org.apache.commons.collections4.MultiSet) ()}.
*/
@ -63,30 +63,30 @@ public class MultiSetUtilsTest {
public void testUnmodifiableMultiSet() {
MultiSet<String> unmodifiable = MultiSetUtils.unmodifiableMultiSet(multiSet);
assertEquals(multiSet, unmodifiable);
try {
unmodifiable.add("a");
fail("Empty multi set must be read-only");
} catch (UnsupportedOperationException e) {
}
try {
MultiSetUtils.unmodifiableMultiSet(null);
fail("Expecting NPE");
} catch (NullPointerException e) {
}
}
/**
* Tests {@link MultiSetUtils#unmodifiableMultiSet(org.apache.commons.collections4.MultiSet) ()}.
*/
@Test
public void testSynchronizedMultiSet() {
MultiSet<String> synced = MultiSetUtils.synchronizedMultiSet(multiSet);
assertEquals(multiSet, synced);
assertEquals(multiSet, synced);
synced.add("a"); // ensure adding works
}
/**
* Tests {@link MultiSetUtils#predicatedMultiSet(org.apache.commons.collections4.MultiSet, org.apache.commons.collections4.Predicate)}.
*/
@ -101,13 +101,13 @@ public class MultiSetUtilsTest {
MultiSet<String> predicated = MultiSetUtils.predicatedMultiSet(multiSet, predicate);
assertEquals(multiSet.size(), predicated.size());
assertEquals(multiSet.getCount("a"), predicated.getCount("a"));
try {
MultiSetUtils.predicatedMultiSet(null, predicate);
fail("Expecting NPE");
} catch (NullPointerException e) {
}
try {
MultiSetUtils.predicatedMultiSet(multiSet, null);
fail("Expecting NPE");

View File

@ -451,7 +451,7 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
// object is not existing
Object obj = m.remove(44);
assertNull(obj);
m.put(ONE, ONE);
obj = m.remove(ONE);
assertSame(ONE, obj);
@ -460,31 +460,31 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
// after removal, be no longer there
obj = m.get(ONE);
assertNull(obj);
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(ONE);
obj = m.remove(ONE);
assertSame(ONE, obj);
obj = m.get(ONE);
assertNull(obj);
obj = m.get(TWO);
assertSame(TWO, obj);
}
public void testRemove2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(ONE);
assertSame(ONE, obj);
obj = m.get(ONE);
assertNull(obj);
obj = m.get(TWO);
@ -492,18 +492,18 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
obj = m.get(THREE);
assertSame(THREE, obj);
}
public void testRemove3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(TWO);
assertSame(TWO, obj);
obj = m.get(ONE);
assertSame(ONE, obj);
obj = m.get(TWO);
@ -511,18 +511,18 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
obj = m.get(THREE);
assertSame(THREE, obj);
}
public void testRemove4() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(THREE);
assertSame(THREE, obj);
obj = m.get(ONE);
assertSame(ONE, obj);
obj = m.get(TWO);
@ -530,63 +530,63 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
obj = m.get(THREE);
assertNull(obj);
}
public void testRemove5() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(null, ONE);
obj = m.remove(null);
assertSame(ONE, obj);
obj = m.get(null);
assertNull(obj);
}
public void testRemove6() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(null, TWO);
obj = m.remove(null);
assertSame(TWO, obj);
obj = m.get(ONE);
assertSame(ONE, obj);
obj = m.get(null);
assertNull(obj);
}
public void testRemove7() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(null, ONE);
m.put(TWO, TWO);
obj = m.remove(null);
assertSame(ONE, obj);
obj = m.get(null);
assertNull(obj);
obj = m.get(TWO);
assertSame(TWO, obj);
}
public void testRemove8() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(null, THREE);
obj = m.remove(null);
assertSame(THREE, obj);
obj = m.get(ONE);
assertSame(ONE, obj);
obj = m.get(TWO);
@ -598,20 +598,20 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
public void testRemove9() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
obj = m.remove(null);
assertNull(obj);
}
public void testRemove10() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
obj = m.remove(null);
assertNull(obj);
}
@ -619,82 +619,82 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
public void testRemove11() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(null);
assertNull(obj);
}
public void testRemove12() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
obj = m.remove(42);
assertNull(obj);
}
public void testRemove13() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
obj = m.remove(42);
assertNull(obj);
}
public void testNewInstance1() {
final Map<Integer, Integer> orig = new HashMap<>();
orig.put(ONE, ONE);
orig.put(TWO, TWO);
final Flat3Map<Integer, Integer> m = new Flat3Map<>(orig);
assertEquals(orig, m);
assertEquals(2, m.size());
}
public void testGet1() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(null, ONE);
obj = m.get(null);
assertSame(ONE, obj);
}
public void testGet2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(null, TWO);
obj = m.get(null);
assertSame(TWO, obj);
}
public void testGet3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(null, THREE);
obj = m.get(null);
assertSame(THREE, obj);
}
public void testContainsKey1() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(null, THREE);
@ -704,24 +704,24 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
public void testContainsKey2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(null, TWO);
boolean contains = m.containsKey(null);
assertEquals(true, contains);
}
public void testContainsKey3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(null, ONE);
boolean contains = m.containsKey(null);
assertEquals(true, contains);
}
public void testContainsValue1() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, null);
@ -731,24 +731,24 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
public void testContainsValue2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, null);
boolean contains = m.containsValue(null);
assertEquals(true, contains);
}
public void testContainsValue3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, null);
boolean contains = m.containsValue(null);
assertEquals(true, contains);
}
public void testPut1() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(null, THREE);
@ -756,29 +756,29 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
assertEquals(THREE, old);
assertEquals(ONE, m.get(null));
}
public void testPut2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(null, THREE);
Object old = m.put(null, ONE);
assertEquals(THREE, old);
assertEquals(ONE, m.get(null));
}
public void testPut3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(null, THREE);
Object old = m.put(null, ONE);
assertEquals(THREE, old);
assertEquals(null, m.get(ONE));
}
public void testPut4() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, TWO);
m.put(THREE, THREE);
@ -786,20 +786,20 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
assertEquals(THREE, old);
assertEquals(ONE, m.get(THREE));
}
public void testPut5() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, ONE);
m.put(TWO, THREE);
Object old = m.put(TWO, ONE);
assertEquals(THREE, old);
assertEquals(ONE, m.get(TWO));
}
public void testPut6() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
m.put(ONE, THREE);
Object old = m.put(ONE, ONE);
assertEquals(THREE, old);