- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 72 for get_num_elements (0.12 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java
getList(), getList().subList(0, getNumElements())); } @ListFeature.Require(SUPPORTS_REMOVE_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testSubList_subListRemoveAffectsOriginal() { List<E> subList = getList().subList(0, 1); subList.remove(0); List<E> expected = asList(createSamplesArray()).subList(1, getNumElements()); expectContents(expected); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 13.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java
getList(), getList().subList(0, getNumElements())); } @ListFeature.Require(SUPPORTS_REMOVE_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testSubList_subListRemoveAffectsOriginal() { List<E> subList = getList().subList(0, 1); subList.remove(0); List<E> expected = asList(createSamplesArray()).subList(1, getNumElements()); expectContents(expected); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 13.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveAtIndexTester.java
() -> { Iterator<E> iterator = collection.iterator(); getList().remove(getNumElements() / 2); iterator.next(); }); } @ListFeature.Require(SUPPORTS_REMOVE_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testRemoveAtIndex_last() { runRemoveTest(getNumElements() - 1); } private void runRemoveTest(int index) { assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java
protected int getNumElements() { return getSubjectGenerator().getCollectionSize().getNumElements(); } protected Collection<E> getSampleElements(int howMany) { return getSubjectGenerator().getSampleElements(howMany); } protected Collection<E> getSampleElements() { return getSampleElements(getNumElements()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java
public void testEquals_shorterList() { Collection<E> fewerElements = getSampleElements(getNumElements() - 1); assertFalse( "Lists of different sizes should not be equal.", getList().equals(new ArrayList<E>(fewerElements))); } public void testEquals_longerList() { Collection<E> moreElements = getSampleElements(getNumElements() + 1); assertFalse( "Lists of different sizes should not be equal.",
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java
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) { a = entries.get(0); if (entries.size() >= 3) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultisetElementSetTester.java
} @CollectionSize.Require(absent = ZERO) @CollectionFeature.Require(SUPPORTS_REMOVE) public void testElementSetRemovePropagatesToMultiset() { Set<E> elementSet = getMultiset().elementSet(); int size = getNumElements(); int expectedSize = size - getMultiset().count(e0()); assertTrue(elementSet.remove(e0())); assertFalse(getMultiset().contains(e0())); assertEquals(expectedSize, getMultiset().size()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java
@MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUES) public void testPutAllNullValueNullLast_unsupported() { int size = getNumElements(); assertThrows( NullPointerException.class, () -> multimap().putAll(k3(), Lists.newArrayList(v3(), null))); Collection<V> values = multimap().get(k3()); if (values.size() == 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 7.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionSizeTester.java
@SuppressWarnings("JUnit4ClassUsedInJUnit3") public class CollectionSizeTester<E> extends AbstractCollectionTester<E> { public void testSize() { assertEquals("size():", getNumElements(), collection.size()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 1.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapSizeTester.java
@SuppressWarnings("JUnit4ClassUsedInJUnit3") public class MapSizeTester<K, V> extends AbstractMapTester<K, V> { public void testSize() { assertEquals("size():", getNumElements(), getMap().size()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 1.3K bytes - Viewed (0)