Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 325 for fail (0.21 sec)

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

      public static void assertMapEntryIsUnmodifiable(Entry<?, ?> entry) {
        try {
          // fine because the call is going to fail without modifying the entry
          @SuppressWarnings("unchecked")
          Entry<?, @Nullable Object> nullableValueEntry = (Entry<?, @Nullable Object>) entry;
          nullableValueEntry.setValue(null);
          fail("setValue on unmodifiable Map.Entry succeeded");
        } catch (UnsupportedOperationException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 15K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/LongMathTest.java

          try {
            LongMath.ceilingPowerOfTwo(x);
            fail("Expected IllegalArgumentException");
          } catch (IllegalArgumentException expected) {
          }
        }
      }
    
      public void testFloorPowerOfTwoNegative() {
        for (long x : NEGATIVE_LONG_CANDIDATES) {
          try {
            LongMath.floorPowerOfTwo(x);
            fail("Expected IllegalArgumentException");
          } catch (IllegalArgumentException expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/RangeTest.java

          range.lowerEndpoint();
          fail();
        } catch (IllegalStateException expected) {
        }
        try {
          range.lowerBoundType();
          fail();
        } catch (IllegalStateException expected) {
        }
      }
    
      private static void assertUnboundedAbove(Range<Integer> range) {
        assertFalse(range.hasUpperBound());
        try {
          range.upperEndpoint();
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 24.1K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

      public static void assertMapEntryIsUnmodifiable(Entry<?, ?> entry) {
        try {
          // fine because the call is going to fail without modifying the entry
          @SuppressWarnings("unchecked")
          Entry<?, @Nullable Object> nullableValueEntry = (Entry<?, @Nullable Object>) entry;
          nullableValueEntry.setValue(null);
          fail("setValue on unmodifiable Map.Entry succeeded");
        } catch (UnsupportedOperationException expected) {
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

       * message passed to a later invocation of {@code fail()}, like "setCount should throw
       * UnsupportedOperationException."
       */
      abstract void setCountNoCheckReturnValue(E element, int count);
    
      private void assertSetCountIncreasingFailure(E element, int count) {
        try {
          setCountNoCheckReturnValue(element, count);
          fail("a call to multiset.setCount() to increase an element's count should throw");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

       * message passed to a later invocation of {@code fail()}, like "setCount should throw
       * UnsupportedOperationException."
       */
      abstract void setCountNoCheckReturnValue(E element, int count);
    
      private void assertSetCountIncreasingFailure(E element, int count) {
        try {
          setCountNoCheckReturnValue(element, count);
          fail("a call to multiset.setCount() to increase an element's count should throw");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/IterablesTest.java

        List<String> list = newArrayList("a", "b", "c");
        Iterable<String> tail = skip(list, 2);
        list.subList(0, 2).clear();
        assertTrue(Iterables.isEmpty(tail));
      }
    
      public void testSkip_illegalArgument() {
        List<String> list = newArrayList("a", "b", "c");
        try {
          skip(list, -1);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 47.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/TableCollectorsTest.java

          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
        collector =
            TableCollectors.toImmutableTable(Cell::getRowKey, Cell::getColumnKey, Cell::getValue);
        try {
          Stream.of(immutableCell("one", "uno", 1), immutableCell("one", "uno", (Integer) null))
              .collect(collector);
          fail("Expected NullPointerException");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Mar 05 16:03:18 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

        try {
          builder.add((String) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add((String[]) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add("a", null, "b");
          fail("expected NullPointerException");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        List<String> list = newArrayList("a", "b", "c");
        Iterable<String> tail = skip(list, 2);
        list.subList(0, 2).clear();
        assertTrue(Iterables.isEmpty(tail));
      }
    
      public void testSkip_illegalArgument() {
        List<String> list = newArrayList("a", "b", "c");
        try {
          skip(list, -1);
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
Back to top