Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 42 for getSampleElements (0.23 sec)

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

      public void testEqualsTrue() {
        new EqualsTester()
            .addEqualityGroup(multimap(), getSubjectGenerator().create(getSampleElements().toArray()))
            .testEquals();
      }
    
      public void testEqualsFalse() {
        List<Entry<K, V>> targetEntries = new ArrayList<>(getSampleElements());
        targetEntries.add(mapEntry(k0(), v3()));
        new EqualsTester()
            .addEqualityGroup(multimap())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeySetTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MultimapKeySetTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      public void testKeySet() {
        for (Entry<K, V> entry : getSampleElements()) {
          assertTrue(multimap().keySet().contains(entry.getKey()));
        }
      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testKeySetContainsNullKeyPresent() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionStreamTester.java

       * that corresponds to the expected elements.
       */
    
      @CollectionFeature.Require(absent = KNOWN_ORDER)
      public void testStreamToArrayUnknownOrder() {
        Helpers.assertEqualIgnoringOrder(getSampleElements(), asList(collection.stream().toArray()));
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testStreamToArrayKnownOrder() {
        assertEquals(getOrderedElements(), asList(collection.stream().toArray()));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/DerivedCollectionGenerators.java

          @SuppressWarnings("unchecked")
          K[] keysArray = (K[]) elements;
    
          // Start with a suitably shaped collection of entries
          Collection<Entry<K, V>> originalEntries = mapGenerator.getSampleElements(elements.length);
    
          // Create a copy of that, with the desired value for each key
          Collection<Entry<K, V>> entries = new ArrayList<>(elements.length);
          int i = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionSpliteratorTester.java

      @CollectionFeature.Require(absent = KNOWN_ORDER)
      public void testSpliteratorUnknownOrder() {
        SpliteratorTester.of(collection::spliterator).expect(getSampleElements());
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testSpliteratorKnownOrder() {
        SpliteratorTester.of(collection::spliterator).expect(getOrderedElements()).inOrder();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/SortedSetNavigationTester.java

      @Override
      public void setUp() throws Exception {
        super.setUp();
        sortedSet = (SortedSet<E>) getSet();
        values =
            copyToList(
                getSubjectGenerator()
                    .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements()));
        sort(values, sortedSet.comparator());
    
        // some tests assume SEVERAL == 3
        if (values.size() >= 1) {
          a = values.get(0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapValuesTester.java

    public class MultimapValuesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      public void testValues() {
        List<V> expected = Lists.newArrayList();
        for (Entry<K, V> entry : getSampleElements()) {
          expected.add(entry.getValue());
        }
        assertEqualIgnoringOrder(expected, multimap().values());
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testValuesInOrder() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/CollectionIteratorTester.java

        runIteratorTest(MODIFIABLE, IteratorTester.KnownOrder.UNKNOWN_ORDER, getSampleElements());
      }
    
      @CollectionFeature.Require(absent = {KNOWN_ORDER, SUPPORTS_ITERATOR_REMOVE})
      public void testIterator_unknownOrderRemoveUnsupported() {
        runIteratorTest(UNMODIFIABLE, IteratorTester.KnownOrder.UNKNOWN_ORDER, getSampleElements());
      }
    
      private void runIteratorTest(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapEntriesTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MultimapEntriesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      public void testEntries() {
        assertEqualIgnoringOrder(getSampleElements(), multimap().entries());
      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testContainsEntryWithNullKeyPresent() {
        initMultimapWithNullKey();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/DerivedGoogleCollectionGenerators.java

          @SuppressWarnings("unchecked")
          V[] valuesArray = (V[]) elements;
    
          // Start with a suitably shaped collection of entries
          Collection<Entry<K, V>> originalEntries = mapGenerator.getSampleElements(elements.length);
    
          // Create a copy of that, with the desired value for each value
          Collection<Entry<K, V>> entries = new ArrayList<>(elements.length);
          int i = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top