Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for testClear (0.08 sec)

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

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MapClearTester<K, V> extends AbstractMapTester<K, V> {
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        getMap().clear();
        assertTrue("After clear(), a map should be empty.", getMap().isEmpty());
        assertEquals(0, getMap().size());
        assertFalse(getMap().entrySet().iterator().hasNext());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/AbstractImmutableTableTest.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class AbstractImmutableTableTest extends TestCase {
    
      abstract Iterable<ImmutableTable<Character, Integer, String>> getTestInstances();
    
      public final void testClear() {
        for (Table<Character, Integer, String> testInstance : getTestInstances()) {
          assertThrows(UnsupportedOperationException.class, () -> testInstance.clear());
        }
      }
    
      public final void testPut() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionClearTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class CollectionClearTester<E> extends AbstractCollectionTester<E> {
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        collection.clear();
        assertTrue("After clear(), a collection should be empty.", collection.isEmpty());
        assertEquals(0, collection.size());
        assertFalse(collection.iterator().hasNext());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/google/MultimapClearTester.java

        assertEmpty(multimap().keys());
        assertEmpty(multimap().values());
        for (K key : sampleKeys()) {
          assertGet(key);
        }
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        multimap().clear();
        assertCleared();
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClearThroughEntries() {
        multimap().entries().clear();
        assertCleared();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/CollectionClearTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class CollectionClearTester<E> extends AbstractCollectionTester<E> {
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        collection.clear();
        assertTrue("After clear(), a collection should be empty.", collection.isEmpty());
        assertEquals(0, collection.size());
        assertFalse(collection.iterator().hasNext());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapClearTester.java

        assertEmpty(multimap().keys());
        assertEmpty(multimap().values());
        for (K key : sampleKeys()) {
          assertGet(key);
        }
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        multimap().clear();
        assertCleared();
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClearThroughEntries() {
        multimap().entries().clear();
        assertCleared();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/MapClearTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MapClearTester<K, V> extends AbstractMapTester<K, V> {
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        getMap().clear();
        assertTrue("After clear(), a map should be empty.", getMap().isEmpty());
        assertEquals(0, getMap().size());
        assertFalse(getMap().entrySet().iterator().hasNext());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

        }
      }
    
      protected boolean supportsRemove() {
        return true;
      }
    
      protected boolean supportsNullValues() {
        return false;
      }
    
      public void testClear() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        if (supportsRemove()) {
          table.clear();
          assertEquals(0, table.size());
          assertFalse(table.containsRow("foo"));
        } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheReferencesTest.java

          assertSame(value, cache.getUnchecked(key));
          assertTrue(cache.asMap().containsKey(key));
          assertTrue(cache.asMap().containsValue(value));
          assertEquals(1, cache.size());
        }
      }
    
      public void testClear() {
        for (LoadingCache<Key, String> cache : caches()) {
          Key key = new Key(1);
          String value = key.toString();
          assertSame(value, cache.getUnchecked(key));
          assertFalse(cache.asMap().isEmpty());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/AbstractTableTest.java

        }
      }
    
      protected boolean supportsRemove() {
        return true;
      }
    
      protected boolean supportsNullValues() {
        return false;
      }
    
      public void testClear() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        if (supportsRemove()) {
          table.clear();
          assertEquals(0, table.size());
          assertFalse(table.containsRow("foo"));
        } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top