Search Options

Results per page
Sort
Preferred Languages
Advance

Results 251 - 260 of 456 for assertThrows (0.08 sec)

  1. guava-tests/test/com/google/common/base/StringsTest.java

        }
    
        assertThrows(IllegalArgumentException.class, () -> Strings.repeat("x", -1));
        assertThrows(
            ArrayIndexOutOfBoundsException.class, () -> Strings.repeat("12345678", (1 << 30) + 3));
      }
    
      @SuppressWarnings("InlineMeInliner") // test of method that doesn't just delegate
      public void testRepeat_null() {
        assertThrows(NullPointerException.class, () -> Strings.repeat(null, 5));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.testing.TearDown;
    import com.google.common.testing.TearDownStack;
    import com.google.common.util.concurrent.testing.TestingExecutors;
    import java.lang.Thread.UncaughtExceptionHandler;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/EvictingQueueTest.java

        assertEquals(0, queue.size());
    
        assertFalse(queue.remove("hi"));
        assertEquals(0, queue.size());
    
        assertThrows(NoSuchElementException.class, () -> queue.element());
    
        assertNull(queue.peek());
        assertNull(queue.poll());
        assertThrows(NoSuchElementException.class, () -> queue.remove());
      }
    
      public void testRemainingCapacity_maxSize0() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/CharsTest.java

        assertThat(Chars.ensureCapacity(ARRAY1, 2, 1))
            .isEqualTo(new char[] {(char) 1, (char) 0, (char) 0});
      }
    
      public void testEnsureCapacity_fail() {
        assertThrows(IllegalArgumentException.class, () -> Chars.ensureCapacity(ARRAY1, -1, 1));
        assertThrows(IllegalArgumentException.class, () -> Chars.ensureCapacity(ARRAY1, 1, -1));
      }
    
      public void testJoin() {
        assertThat(Chars.join(",", EMPTY)).isEmpty();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/collect/testing/features/FeatureUtilTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.lang.annotation.RetentionPolicy.RUNTIME;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.testing.features.FeatureUtilTest.ExampleFeature.NotTesterAnnotation;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 05 22:05:05 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/SuppliersTest.java

      }
    
      @SuppressWarnings("DoNotCall")
      public void testMemoizeWithExpiration_longTimeUnitNegative() throws InterruptedException {
        assertThrows(
            IllegalArgumentException.class,
            () -> Suppliers.memoizeWithExpiration(() -> "", 0, MILLISECONDS));
    
        assertThrows(
            IllegalArgumentException.class,
            () -> Suppliers.memoizeWithExpiration(() -> "", -1, MILLISECONDS));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/SuppliersTest.java

      }
    
      @SuppressWarnings("DoNotCall")
      public void testMemoizeWithExpiration_longTimeUnitNegative() throws InterruptedException {
        assertThrows(
            IllegalArgumentException.class,
            () -> Suppliers.memoizeWithExpiration(() -> "", 0, MILLISECONDS));
    
        assertThrows(
            IllegalArgumentException.class,
            () -> Suppliers.memoizeWithExpiration(() -> "", -1, MILLISECONDS));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertFalse(source.contentEquals(oneByteOff));
      }
    
      public void testSlice() throws IOException {
        // Test preconditions
        assertThrows(IllegalArgumentException.class, () -> source.slice(-1, 10));
    
        assertThrows(IllegalArgumentException.class, () -> source.slice(0, -1));
    
        assertCorrectSlice(0, 0, 0, 0);
        assertCorrectSlice(0, 0, 1, 0);
        assertCorrectSlice(100, 0, 10, 10);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

        assertEquals(20, multimap.expectedValuesPerKey);
      }
    
      public void testCreateFromIllegalSizes() {
        assertThrows(IllegalArgumentException.class, () -> ArrayListMultimap.create(15, -2));
    
        assertThrows(IllegalArgumentException.class, () -> ArrayListMultimap.create(-15, 2));
      }
    
      public void testCreateFromHashMultimap() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListListIteratorTester.java

            expectContents(elements);
          }
        }.test();
      }
    
      public void testListIterator_tooLow() {
        assertThrows(IndexOutOfBoundsException.class, () -> getList().listIterator(-1));
      }
    
      public void testListIterator_tooHigh() {
        assertThrows(
            IndexOutOfBoundsException.class, () -> getList().listIterator(getNumElements() + 1));
      }
    
      public void testListIterator_atSize() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top