Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TestLimit (0.07 sec)

  1. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

      }
    
      public void testSkip_illegalArgument() {
        assertThrows(
            IllegalArgumentException.class, () -> FluentIterable.from(asList("a", "b", "c")).skip(-1));
      }
    
      public void testLimit() {
        Iterable<String> iterable = Lists.newArrayList("foo", "bar", "baz");
        FluentIterable<String> limited = FluentIterable.from(iterable).limit(2);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals("[]", Iterables.toString(list));
    
        list = newArrayList("yam", "bam", "jam", "ham");
        assertEquals("[yam, bam, jam, ham]", Iterables.toString(list));
      }
    
      public void testLimit() {
        Iterable<String> iterable = newArrayList("foo", "bar", "baz");
        Iterable<String> limited = Iterables.limit(iterable, 2);
    
        List<String> expected = ImmutableList.of("foo", "bar");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = Collections.<String>emptyList().iterator();
        assertEquals("[]", Iterators.toString(iterator));
      }
    
      @SuppressWarnings("JUnitIncompatibleType") // Fails with j2kt.
      public void testLimit() {
        List<String> list = newArrayList();
        assertThrows(IllegalArgumentException.class, () -> Iterators.limit(list.iterator(), -1));
    
        assertFalse(Iterators.limit(list.iterator(), 0).hasNext());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = Collections.<String>emptyList().iterator();
        assertEquals("[]", Iterators.toString(iterator));
      }
    
      @SuppressWarnings("JUnitIncompatibleType") // Fails with j2kt.
      public void testLimit() {
        List<String> list = newArrayList();
        assertThrows(IllegalArgumentException.class, () -> Iterators.limit(list.iterator(), -1));
    
        assertFalse(Iterators.limit(list.iterator(), 0).hasNext());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
Back to top