The following issues were found
android/guava-tests/test/com/google/common/collect/IteratorsTest.java
825 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.CollectPreconditions.checkRemove;
import static com.google.common.collect.Iterators.advance;
import static com.google.common.collect.Iterators.get;
import static com.google.common.collect.Iterators.getLast;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.CollectPreconditions.checkRemove;
import static com.google.common.collect.Iterators.advance;
import static com.google.common.collect.Iterators.get;
import static com.google.common.collect.Iterators.getLast;
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 69
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
suite.addTestSuite(IteratorsTest.class);
return suite;
Reported by PMD.
Line: 77
return suite;
}
public void testEmptyIterator() {
Iterator<String> iterator = Iterators.emptyIterator();
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
Reported by PMD.
Line: 79
public void testEmptyIterator() {
Iterator<String> iterator = Iterators.emptyIterator();
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
} catch (NoSuchElementException expected) {
}
Reported by PMD.
Line: 82
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
} catch (NoSuchElementException expected) {
}
try {
iterator.remove();
fail("no exception thrown");
Reported by PMD.
guava-tests/test/com/google/common/collect/IteratorsTest.java
825 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.CollectPreconditions.checkRemove;
import static com.google.common.collect.Iterators.advance;
import static com.google.common.collect.Iterators.get;
import static com.google.common.collect.Iterators.getLast;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.CollectPreconditions.checkRemove;
import static com.google.common.collect.Iterators.advance;
import static com.google.common.collect.Iterators.get;
import static com.google.common.collect.Iterators.getLast;
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 67
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
Reported by PMD.
Line: 69
@GwtCompatible(emulated = true)
public class IteratorsTest extends TestCase {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite(IteratorsTest.class.getSimpleName());
suite.addTest(testsForRemoveAllAndRetainAll());
suite.addTestSuite(IteratorsTest.class);
return suite;
Reported by PMD.
Line: 77
return suite;
}
public void testEmptyIterator() {
Iterator<String> iterator = Iterators.emptyIterator();
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
Reported by PMD.
Line: 79
public void testEmptyIterator() {
Iterator<String> iterator = Iterators.emptyIterator();
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
} catch (NoSuchElementException expected) {
}
Reported by PMD.
Line: 82
assertFalse(iterator.hasNext());
try {
iterator.next();
fail("no exception thrown");
} catch (NoSuchElementException expected) {
}
try {
iterator.remove();
fail("no exception thrown");
Reported by PMD.
guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java
638 issues
Line: 35
/** @author Charles Fry */
@SuppressWarnings("deprecation") // many tests of deprecated methods
public class MapMakerInternalMapTest extends TestCase {
static final int SMALL_MAX_SIZE = DRAIN_THRESHOLD * 5;
private static <K, V>
MapMakerInternalMap<K, V, ? extends InternalEntry<K, V, ?>, ? extends Segment<K, V, ?, ?>>
Reported by PMD.
Line: 35
/** @author Charles Fry */
@SuppressWarnings("deprecation") // many tests of deprecated methods
public class MapMakerInternalMapTest extends TestCase {
static final int SMALL_MAX_SIZE = DRAIN_THRESHOLD * 5;
private static <K, V>
MapMakerInternalMap<K, V, ? extends InternalEntry<K, V, ?>, ? extends Segment<K, V, ?, ?>>
Reported by PMD.
Line: 53
// constructor tests
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
Reported by PMD.
Line: 53
// constructor tests
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
Reported by PMD.
Line: 56
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
Reported by PMD.
Line: 56
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
Reported by PMD.
Line: 57
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 57
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 58
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 58
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
android/guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java
638 issues
Line: 35
/** @author Charles Fry */
@SuppressWarnings("deprecation") // many tests of deprecated methods
public class MapMakerInternalMapTest extends TestCase {
static final int SMALL_MAX_SIZE = DRAIN_THRESHOLD * 5;
private static <K, V>
MapMakerInternalMap<K, V, ? extends InternalEntry<K, V, ?>, ? extends Segment<K, V, ?, ?>>
Reported by PMD.
Line: 35
/** @author Charles Fry */
@SuppressWarnings("deprecation") // many tests of deprecated methods
public class MapMakerInternalMapTest extends TestCase {
static final int SMALL_MAX_SIZE = DRAIN_THRESHOLD * 5;
private static <K, V>
MapMakerInternalMap<K, V, ? extends InternalEntry<K, V, ?>, ? extends Segment<K, V, ?, ?>>
Reported by PMD.
Line: 53
// constructor tests
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
Reported by PMD.
Line: 53
// constructor tests
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
Reported by PMD.
Line: 56
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
Reported by PMD.
Line: 56
public void testDefaults() {
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
Reported by PMD.
Line: 57
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 57
MapMakerInternalMap<Object, Object, ?, ?> map = makeMap(createMapMaker());
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 58
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
Line: 58
assertSame(Strength.STRONG, map.keyStrength());
assertSame(Strength.STRONG, map.valueStrength());
assertSame(map.keyStrength().defaultEquivalence(), map.keyEquivalence);
assertSame(map.valueStrength().defaultEquivalence(), map.valueEquivalence());
assertThat(map.entryHelper)
.isInstanceOf(MapMakerInternalMap.StrongKeyStrongValueEntry.Helper.class);
Reported by PMD.
guava-tests/test/com/google/common/collect/IterablesTest.java
636 issues
Line: 385
// always point to "a".
for (String string : cycle) {
assertEquals("a", string);
break;
}
assertEquals("[a, b] (cycled)", cycle.toString());
}
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.skip;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newLinkedHashSet;
import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.skip;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newLinkedHashSet;
import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE;
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 60
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Reported by PMD.
Line: 62
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Iterable<String> iterable = Collections.singleton("a");
assertEquals(1, Iterables.size(iterable));
Reported by PMD.
Line: 65
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Iterable<String> iterable = Collections.singleton("a");
assertEquals(1, Iterables.size(iterable));
}
public void testSize2NonCollection() {
Reported by PMD.
android/guava-tests/test/com/google/common/collect/IterablesTest.java
617 issues
Line: 356
// always point to "a".
for (String string : cycle) {
assertEquals("a", string);
break;
}
assertEquals("[a, b] (cycled)", cycle.toString());
}
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.skip;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newLinkedHashSet;
import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.skip;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newLinkedHashSet;
import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE;
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
Reported by PMD.
Line: 60
@GwtCompatible(emulated = true)
public class IterablesTest extends TestCase {
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Reported by PMD.
Line: 62
public void testSize0() {
Iterable<String> iterable = Collections.emptySet();
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Iterable<String> iterable = Collections.singleton("a");
assertEquals(1, Iterables.size(iterable));
Reported by PMD.
Line: 65
assertEquals(0, Iterables.size(iterable));
}
public void testSize1Collection() {
Iterable<String> iterable = Collections.singleton("a");
assertEquals(1, Iterables.size(iterable));
}
public void testSize2NonCollection() {
Reported by PMD.
android/guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java
614 issues
Line: 851
assertEquals(makePopulatedMap(), map);
assertFalse(map.equals(Collections.emptyMap()));
// no-inspection ObjectEqualsNull
assertFalse(map.equals(null));
}
public void testEqualsForLargerMap() {
if (!supportsPut) {
return;
Reported by PMD.
Line: 903
assertEquals(Collections.emptyMap(), map);
assertFalse(map.equals(Collections.emptySet()));
// noinspection ObjectEqualsNull
assertFalse(map.equals(null));
}
public void testGet() {
final Map<K, V> map;
try {
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect.testing;
import static java.util.Collections.singleton;
import com.google.common.annotations.GwtCompatible;
import java.util.Arrays;
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 55
}
}
protected final boolean supportsPut;
protected final boolean supportsRemove;
protected final boolean supportsClear;
protected final boolean allowsNullKeys;
protected final boolean allowsNullValues;
protected final boolean supportsIteratorRemove;
Reported by PMD.
guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java
614 issues
Line: 851
assertEquals(makePopulatedMap(), map);
assertFalse(map.equals(Collections.emptyMap()));
// no-inspection ObjectEqualsNull
assertFalse(map.equals(null));
}
public void testEqualsForLargerMap() {
if (!supportsPut) {
return;
Reported by PMD.
Line: 903
assertEquals(Collections.emptyMap(), map);
assertFalse(map.equals(Collections.emptySet()));
// noinspection ObjectEqualsNull
assertFalse(map.equals(null));
}
public void testGet() {
final Map<K, V> map;
try {
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect.testing;
import static java.util.Collections.singleton;
import com.google.common.annotations.GwtCompatible;
import java.util.Arrays;
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 45
// check the order if so.
// TODO: Refactor to share code with SetTestBuilder etc.
@GwtCompatible
public abstract class MapInterfaceTest<K, V> extends TestCase {
/** A key type that is not assignable to any classes but Object. */
private static final class IncompatibleKeyType {
@Override
public String toString() {
Reported by PMD.
Line: 55
}
}
protected final boolean supportsPut;
protected final boolean supportsRemove;
protected final boolean supportsClear;
protected final boolean allowsNullKeys;
protected final boolean allowsNullValues;
protected final boolean supportsIteratorRemove;
Reported by PMD.
android/guava-tests/test/com/google/common/collect/RangeTest.java
579 issues
Line: 42
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
Reported by PMD.
Line: 42
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
Reported by PMD.
Line: 43
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
Reported by PMD.
Line: 43
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
Reported by PMD.
Line: 46
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
Reported by PMD.
Line: 46
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
Reported by PMD.
Line: 47
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
Reported by PMD.
Line: 47
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
Reported by PMD.
Line: 48
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
assertEquals("(4..8)", range.toString());
Reported by PMD.
Line: 48
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
assertEquals("(4..8)", range.toString());
Reported by PMD.
guava-tests/test/com/google/common/collect/RangeTest.java
579 issues
Line: 42
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
Reported by PMD.
Line: 42
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
Reported by PMD.
Line: 43
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
Reported by PMD.
Line: 43
*/
@GwtCompatible(emulated = true)
public class RangeTest extends TestCase {
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
Reported by PMD.
Line: 46
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
Reported by PMD.
Line: 46
public void testOpen() {
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
Reported by PMD.
Line: 47
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
Reported by PMD.
Line: 47
Range<Integer> range = Range.open(4, 8);
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
Reported by PMD.
Line: 48
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
assertEquals("(4..8)", range.toString());
Reported by PMD.
Line: 48
checkContains(range);
assertTrue(range.hasLowerBound());
assertEquals(4, (int) range.lowerEndpoint());
assertEquals(OPEN, range.lowerBoundType());
assertTrue(range.hasUpperBound());
assertEquals(8, (int) range.upperEndpoint());
assertEquals(OPEN, range.upperBoundType());
assertFalse(range.isEmpty());
assertEquals("(4..8)", range.toString());
Reported by PMD.