- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for WrongType (0.11 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/WrongType.java
/** * A type which will never be used as the element type of any collection in our tests, and so can be * used to test how a Collection behaves when given input of the wrong type. */ @GwtCompatible public enum WrongType { VALUE
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 934 bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapContainsKeyTester.java
} public void testContains_wrongType() { try { // noinspection SuspiciousMethodCalls assertFalse( "containsKey(wrongType) should return false or throw", getMap().containsKey(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetTester.java
assertEquals("get(null) should return the associated value", getValueForNullKey(), get(null)); } public void testGet_wrongType() { try { assertNull("get(wrongType) should return null or throw", getMap().get(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java
getNullLocation(), find(null)); } public void testFind_wrongType() { try { assertEquals( getMethodName() + "(wrongType) should return -1 or throw", -1, find(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsTester.java
assertTrue("contains(null) should return true", collection.contains(null)); } public void testContains_wrongType() { try { assertFalse( "contains(wrongType) should return false or throw", collection.contains(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java
getNullLocation(), find(null)); } public void testFind_wrongType() { try { assertEquals( getMethodName() + "(wrongType) should return -1 or throw", -1, find(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultisetCountTester.java
initCollectionWithNullElement(); assertEquals(1, getMultiset().count(null)); } public void testCount_wrongType() { assertEquals( "multiset.count(wrongType) didn't return 0", 0, getMultiset().count(WrongType.VALUE)); } /** * Returns {@link Method} instances for the read tests that assume multisets support duplicates so * that the test of {@code Multisets.forSet()} can suppress them. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java
assertTrue(collection.containsAll(MinimalCollection.of((E) null))); } public void testContainsAll_wrongType() { Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE); try { assertFalse( "containsAll(wrongType) should return false or throw", collection.containsAll(wrong)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionToArrayTester.java
assertThrows( ArrayStoreException.class, () -> { WrongType[] array = new WrongType[0]; collection.toArray(array); }); } @CollectionSize.Require(ZERO) public void testToArray_emptyArrayOfWrongTypeForEmptyCollection() { WrongType[] array = new WrongType[0]; assertSame( "toArray(sameSizeNotAssignableTo[]) should return the given array",
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapContainsValueTester.java
} public void testContains_wrongType() { try { // noinspection SuspiciousMethodCalls assertFalse( "containsValue(wrongType) should return false or throw", getMap().containsValue(WrongType.VALUE)); } catch (ClassCastException tolerated) { } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.2K bytes - Viewed (0)