Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for getSampleElements (0.21 sec)

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

        assertTrue(
            "A Set should equal any other Set containing the same elements.",
            getSet().equals(MinimalSet.from(getSampleElements())));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherSetWithDifferentElements() {
        Collection<E> elements = getSampleElements(getNumElements() - 1);
        elements.add(getSubjectGenerator().samples().e3());
    
        assertFalse(
    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. guava-testlib/src/com/google/common/collect/testing/testers/SetEqualsTester.java

        assertTrue(
            "A Set should equal any other Set containing the same elements.",
            getSet().equals(MinimalSet.from(getSampleElements())));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherSetWithDifferentElements() {
        Collection<E> elements = getSampleElements(getNumElements() - 1);
        elements.add(getSubjectGenerator().samples().e3());
    
        assertFalse(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java

      public void setUp() throws Exception {
        super.setUp();
        navigableMap = (SortedMap<K, V>) getMap();
        List<Entry<K, V>> entries =
            copyToList(
                getSubjectGenerator()
                    .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements()));
        sort(entries, Helpers.<K, V>entryComparator(navigableMap.comparator()));
    
        // some tests assume SEVERAL == 3
        if (entries.size() >= 1) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

        ArrayList<E> elements = new ArrayList<>(getSampleElements());
        elements.set(elements.size() / 2, null);
        collection = getSubjectGenerator().create(elements.toArray());
        List<E> other = new ArrayList<>(getSampleElements());
        assertFalse(
            "Two Lists should not be equal if exactly one of them has null at a given index.",
            getList().equals(other));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

      protected int getNumEntries() {
        return getNumElements();
      }
    
      protected Collection<Entry<K, V>> getSampleEntries(int howMany) {
        return getSampleElements(howMany);
      }
    
      protected Collection<Entry<K, V>> getSampleEntries() {
        return getSampleElements();
      }
    
      @Override
      protected void expectMissing(Entry<K, V>... entries) {
        for (Entry<K, V> entry : entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetReadsTester.java

        assertTrue(
            "multiset doesn't equal a multiset with the same elements",
            getMultiset().equals(HashMultiset.create(getSampleElements())));
      }
    
      public void testEquals_differentSize() {
        Multiset<E> other = HashMultiset.create(getSampleElements());
        other.add(e0());
        assertFalse("multiset equals a multiset with a different size", getMultiset().equals(other));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultisetReadsTester.java

        assertTrue(
            "multiset doesn't equal a multiset with the same elements",
            getMultiset().equals(HashMultiset.create(getSampleElements())));
      }
    
      public void testEquals_differentSize() {
        Multiset<E> other = HashMultiset.create(getSampleElements());
        other.add(e0());
        assertFalse("multiset equals a multiset with a different size", getMultiset().equals(other));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class SetHashCodeTester<E> extends AbstractSetTester<E> {
      public void testHashCode() {
        int expectedHashCode = 0;
        for (E element : getSampleElements()) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
            "A Set's hashCode() should be the sum of those of its elements.",
            expectedHashCode,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. android/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)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

        ArrayList<E> elements = new ArrayList<>(getSampleElements());
        elements.set(elements.size() / 2, null);
        collection = getSubjectGenerator().create(elements.toArray());
        List<E> other = new ArrayList<>(getSampleElements());
        assertFalse(
            "Two Lists should not be equal if exactly one of them has null at a given index.",
            getList().equals(other));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top