Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for createArrayWithNullElement (0.43 sec)

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

      public void testCreateWithNull_supported() {
        E[] array = createArrayWithNullElement();
        collection = getSubjectGenerator().create(array);
        expectContents(array);
      }
    
      @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNull_unsupported() {
        E[] array = createArrayWithNullElement();
    
        assertThrows(
            NullPointerException.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionCreationTester.java

      public void testCreateWithNull_supported() {
        E[] array = createArrayWithNullElement();
        collection = getSubjectGenerator().create(array);
        expectContents(array);
      }
    
      @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNull_unsupported() {
        E[] array = createArrayWithNullElement();
    
        assertThrows(
            NullPointerException.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/SetCreationTester.java

      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testCreateWithDuplicates_nullDuplicatesNotRejected() {
        E[] array = createArrayWithNullElement();
        array[0] = null;
        collection = getSubjectGenerator().create(array);
    
        List<E> expectedWithDuplicateRemoved = asList(array).subList(1, getNumElements());
        expectContents(expectedWithDuplicateRemoved);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/SetCreationTester.java

      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testCreateWithDuplicates_nullDuplicatesNotRejected() {
        E[] array = createArrayWithNullElement();
        array[0] = null;
        collection = getSubjectGenerator().create(array);
    
        List<E> expectedWithDuplicateRemoved = asList(array).subList(1, getNumElements());
        expectContents(expectedWithDuplicateRemoved);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      }
    
      @CollectionFeature.Require({SUPPORTS_REMOVE, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testRemove_nullPresent() {
        collection = getSubjectGenerator().create(createArrayWithNullElement());
    
        int initialSize = collection.size();
        assertTrue("remove(null) should return true", collection.remove(null));
        assertEquals(
            "remove(present) should decrease a collection's size by one.",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/SetAddTester.java

        expectUnchanged();
      }
    
      @CollectionFeature.Require(value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testAdd_supportedNullPresent() {
        E[] array = createArrayWithNullElement();
        collection = getSubjectGenerator().create(array);
        assertFalse("add(nullPresent) should return false", getSet().add(null));
        expectContents(array);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/ListAddTester.java

      }
    
      @CollectionFeature.Require(value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testAdd_supportedNullPresent() {
        E[] array = createArrayWithNullElement();
        collection = getSubjectGenerator().create(array);
        assertTrue("add(nullPresent) should return true", getList().add(null));
    
        List<E> expected = copyToList(array);
        expected.add(null);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddTester.java

      }
    
      @CollectionFeature.Require(value = {SUPPORTS_ADD, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testAdd_supportedNullPresent() {
        E[] array = createArrayWithNullElement();
        collection = getSubjectGenerator().create(array);
        assertTrue("add(nullPresent) should return true", getList().add(null));
    
        List<E> expected = copyToList(array);
        expected.add(null);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionIteratorTester.java

        List<E> iteratorElements = new ArrayList<>();
        for (E element : collection) { // uses iterator()
          iteratorElements.add(element);
        }
        assertEqualIgnoringOrder(asList(createArrayWithNullElement()), iteratorElements);
      }
    
      @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE)
      @CollectionSize.Require(absent = ZERO)
      public void testIterator_removeAffectsBackingCollection() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      }
    
      @CollectionFeature.Require({SUPPORTS_REMOVE, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testRemove_nullPresent() {
        collection = getSubjectGenerator().create(createArrayWithNullElement());
    
        int initialSize = collection.size();
        assertTrue("remove(null) should return true", collection.remove(null));
        assertEquals(
            "remove(present) should decrease a collection's size by one.",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top