Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,618 for fail (0.17 sec)

  1. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  2. 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)
  3. guava-tests/test/com/google/common/base/PreconditionsTest.java

          Preconditions.checkArgument(false);
          fail("no exception thrown");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      public void testCheckArgument_simpleMessage_success() {
        Preconditions.checkArgument(true, IGNORE_ME);
      }
    
      public void testCheckArgument_simpleMessage_failure() {
        try {
          Preconditions.checkArgument(false, new Message());
          fail("no exception thrown");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java

          equalsTester.addEqualityGroup((Object) null);
          fail("Should fail on null reference");
        } catch (NullPointerException e) {
        }
      }
    
      /** Test equalObjects after adding multiple instances at once with a null */
      public void testAddTwoEqualObjectsAtOnceWithNull() {
        try {
          equalsTester.addEqualityGroup(reference, equalObject1, null);
          fail("Should fail on null equal object");
        } catch (NullPointerException e) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/ListAddAtIndexTester.java

          getList().add(0, e3());
          iterator.next();
          fail("Expected ConcurrentModificationException");
        } catch (ConcurrentModificationException expected) {
          // success
        }
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
      public void testAddAtIndex_unsupportedNotPresent() {
        try {
          getList().add(0, e3());
          fail("add(n, notPresent) should throw");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

        try {
          iter.peek();
          fail("peek() should throw NoSuchElementException at end");
        } catch (NoSuchElementException expected) {
        }
    
        try {
          iter.peek();
          fail("peek() should continue to throw NoSuchElementException at end");
        } catch (NoSuchElementException expected) {
        }
    
        try {
          iter.next();
          fail("next() should throw NoSuchElementException as usual");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
        } catch (CancellationException expected) {
        }
      }
    
      public void testGetUnchecked_ExecutionExceptionChecked() {
        try {
          getUnchecked(FAILED_FUTURE_CHECKED_EXCEPTION);
          fail();
        } catch (UncheckedExecutionException expected) {
          assertEquals(CHECKED_EXCEPTION, expected.getCause());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  8. 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)
  9. android/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 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 24.1K bytes
    - Viewed (0)
  10. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.3K bytes
    - Viewed (0)
Back to top