Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 36 of 36 for createSamplesArray (0.23 sec)

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

      }
    
      @ListFeature.Require(SUPPORTS_SET)
      public void testReplaceAll_changesSome() {
        getList().replaceAll(e -> e.equals(samples.e0()) ? samples.e3() : e);
        E[] expected = createSamplesArray();
        for (int i = 0; i < expected.length; i++) {
          if (expected[i].equals(samples.e0())) {
            expected[i] = samples.e3();
          }
        }
        expectContents(expected);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jun 28 16:27:15 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/AbstractCollectionTester.java

        resetContainer();
      }
    
      /** @return an array of the proper size with {@code null} inserted into the middle element. */
      protected E[] createArrayWithNullElement() {
        E[] array = createSamplesArray();
        array[getNullLocation()] = null;
        return array;
      }
    
      protected void initCollectionWithNullElement() {
        E[] array = createArrayWithNullElement();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

      }
    
      public void testContainsAll_sameElements() {
        assertTrue(
            "containsAll(sameElements) should return true",
            collection.containsAll(MinimalCollection.of(createSamplesArray())));
      }
    
      @SuppressWarnings("ModifyingCollectionWithItself")
      public void testContainsAll_self() {
        assertTrue("containsAll(this) should return true", collection.containsAll(collection));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. 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);
        }
        Helpers.assertEqualIgnoringOrder(Arrays.asList(createSamplesArray()), iteratorElements);
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testIterationOrdering() {
        List<E> iteratorElements = new ArrayList<>();
        for (E element : collection) { // uses iterator()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveAtIndexTester.java

        assertEquals(
            Platform.format("remove(%d) should return the element at index %d", index, index),
            getList().get(index),
            getList().remove(index));
        List<E> expected = Helpers.copyToList(createSamplesArray());
        expected.remove(index);
        expectContents(expected);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 4K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

        doTestSet(null);
      }
    
      @CollectionSize.Require(absent = ZERO)
      @CollectionFeature.Require(ALLOWS_NULL_VALUES)
      @ListFeature.Require(SUPPORTS_SET)
      public void testSet_replacingNull() {
        E[] elements = createSamplesArray();
        int i = aValidIndex();
        elements[i] = null;
        collection = getSubjectGenerator().create(elements);
    
        doTestSet(e3());
      }
    
      private void doTestSet(E newValue) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top