Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for initMapWithNullKey (0.12 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/MapCreationTester.java

      public void testCreateWithNullKeySupported() {
        initMapWithNullKey();
        expectContents(createArrayWithNullKey());
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNullKeyUnsupported() {
        assertThrows(NullPointerException.class, () -> initMapWithNullKey());
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetOrDefaultTester.java

      public void testGetOrDefault_nonNullWhenNullContained() {
        initMapWithNullKey();
        assertEquals(
            "getOrDefault(absent, default) should return default",
            v3(),
            getMap().getOrDefault(k3(), v3()));
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testGetOrDefault_presentNull() {
        initMapWithNullKey();
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/MapCreationTester.java

      public void testCreateWithNullKeySupported() {
        initMapWithNullKey();
        expectContents(createArrayWithNullKey());
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNullKeyUnsupported() {
        assertThrows(NullPointerException.class, () -> initMapWithNullKey());
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/MapRemoveTester.java

        expectUnchanged();
      }
    
      @MapFeature.Require({SUPPORTS_REMOVE, ALLOWS_NULL_KEYS})
      @CollectionSize.Require(absent = ZERO)
      public void testRemove_nullPresent() {
        initMapWithNullKey();
    
        int initialSize = getMap().size();
        assertEquals(
            "remove(null) should return the associated value",
            getValueForNullKey(),
            getMap().remove(null));
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutTester.java

      }
    
      @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS})
      @CollectionSize.Require(absent = ZERO)
      public void testPut_nullKeySupportedPresent() {
        Entry<K, V> newEntry = entry(null, v3());
        initMapWithNullKey();
        assertEquals(
            "put(present, value) should return the associated value",
            getValueForNullKey(),
            put(newEntry));
    
        Entry<K, V>[] expected = createArrayWithNullKey();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

        int nullValueLocation = getNullLocation();
        Entry<K, V> oldEntry = array[nullValueLocation];
        array[nullValueLocation] = entry(oldEntry.getKey(), null);
        return array;
      }
    
      protected void initMapWithNullKey() {
        resetMap(createArrayWithNullKey());
      }
    
      protected void initMapWithNullValue() {
        resetMap(createArrayWithNullValue());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/MapForEachTester.java

        assertEqualIgnoringOrder(getSampleEntries(), entries);
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testForEach_nullKeys() {
        initMapWithNullKey();
        List<Entry<K, V>> expectedEntries = asList(createArrayWithNullKey());
        List<Entry<K, V>> entries = new ArrayList<>();
        getMap().forEach((k, v) -> entries.add(entry(k, v)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/MapForEachTester.java

        Helpers.assertEqualIgnoringOrder(getSampleEntries(), entries);
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testForEach_nullKeys() {
        initMapWithNullKey();
        List<Entry<K, V>> expectedEntries = asList(createArrayWithNullKey());
        List<Entry<K, V>> entries = new ArrayList<>();
        getMap().forEach((k, v) -> entries.add(entry(k, v)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/BiMapPutTester.java

        assertFalse(getMap().containsValue(v0()));
      }
    
      @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS})
      @CollectionSize.Require(ONE)
      public void testForcePutNullKeyPresent() {
        initMapWithNullKey();
    
        getMap().forcePut(null, v1());
    
        expectContents(mapEntry((K) null, v1()));
    
        assertFalse(getMap().containsValue(v0()));
    
        assertTrue(getMap().containsValue(v1()));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/MapComputeTester.java

      }
    
      @MapFeature.Require({SUPPORTS_PUT, SUPPORTS_REMOVE, ALLOWS_NULL_KEYS})
      @CollectionSize.Require(absent = ZERO)
      public void testCompute_nullKeyPresentToPresent() {
        initMapWithNullKey();
        assertEquals(
            "Map.compute(present, functionReturningValue) should return new value",
            v3(),
            getMap()
                .compute(
                    null,
                    (k, v) -> {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top