Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for WrongType (0.08 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetOrDefaultTester.java

            getMap().getOrDefault(getKeyForNullValue(), v3()));
      }
    
      public void testGet_wrongType() {
        try {
          assertEquals(
              "getOrDefault(wrongType, default) should return default or throw",
              v3(),
              getMap().getOrDefault(WrongType.VALUE, v3()));
        } catch (ClassCastException tolerated) {
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top