Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 726 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. 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)
  3. 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)
  4. guava-testlib/src/com/google/common/collect/testing/testers/MapPutAllTester.java

        expectAdded(e3());
      }
    
      @MapFeature.Require({FAILS_FAST_ON_CONCURRENT_MODIFICATION, SUPPORTS_PUT})
      @CollectionSize.Require(absent = ZERO)
      public void testPutAllSomePresentConcurrentWithEntrySetIteration() {
        try {
          Iterator<Entry<K, V>> iterator = getMap().entrySet().iterator();
          putAll(MinimalCollection.of(e3(), e0()));
          iterator.next();
          fail("Expected ConcurrentModificationException");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      }
    
      /**
       * Just like fail(reason), but additionally recording (using threadRecordFailure) any
       * AssertionFailedError thrown, so that the current testcase will fail.
       */
      public void threadFail(String reason) {
        try {
          fail(reason);
        } catch (AssertionFailedError t) {
          threadRecordFailure(t);
          fail(reason);
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

          assertInvariants(map);
          try {
            iterator.remove();
            fail("Expected IllegalStateException.");
          } catch (IllegalStateException expected) {
          }
        } else {
          iterator.next();
          try {
            iterator.remove();
            fail("Expected UnsupportedOperationException.");
          } catch (UnsupportedOperationException expected) {
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 45.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/IteratorsTest.java

        try {
          iterator.next();
          fail("no exception thrown");
        } catch (NoSuchElementException expected) {
        }
        try {
          iterator.previous();
          fail("no exception thrown");
        } catch (NoSuchElementException expected) {
        }
        try {
          iterator.remove();
          fail("no exception thrown");
        } catch (UnsupportedOperationException expected) {
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 55.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

          // One more than maximum value
          UnsignedInts.decode("0xfffffffff");
          fail();
        } catch (NumberFormatException expected) {
        }
    
        try {
          UnsignedInts.decode("-5");
          fail();
        } catch (NumberFormatException expected) {
        }
    
        try {
          UnsignedInts.decode("-0x5");
          fail();
        } catch (NumberFormatException expected) {
        }
    
        try {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/VerifyTest.java

      public void testVerify_simple_failure() {
        try {
          verify(false);
          fail();
        } catch (VerifyException expected) {
        }
      }
    
      public void testVerify_simpleMessage_success() {
        verify(true, "message");
      }
    
      public void testVerify_simpleMessage_failure() {
        try {
          verify(false, "message");
          fail();
        } catch (VerifyException expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

          }
        }
      }
    
      public void testStaticOneArgMethodsThatShouldFail() throws Exception {
        for (String methodName : STATIC_ONE_ARG_METHODS_SHOULD_FAIL) {
          Method method = OneArg.class.getMethod(methodName, String.class);
          boolean foundProblem = false;
          try {
            new NullPointerTester().testMethodParameter(new OneArg(), method, 0);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
Back to top