Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for ArithmeticException (0.2 sec)

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

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 22 13:49:09 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        assertThrows(
            ArithmeticException.class, () -> MathPreconditions.checkRoundingUnnecessary(false));
      }
    
      public void testCheckInRange_success() {
        MathPreconditions.checkInRangeForRoundingInputs(true, 1.0, RoundingMode.UP);
      }
    
      public void testCheckInRange_failure() {
        ArithmeticException expected =
            assertThrows(
                ArithmeticException.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/LongMathTest.java

            // unless all n are fair game with this k
            assertThrows(
                ArithmeticException.class,
                () -> simpleBinomial(LongMath.biggestSimpleBinomials[k] + 1, k));
          }
        }
        int k = LongMath.biggestSimpleBinomials.length;
        assertThrows(ArithmeticException.class, () -> simpleBinomial(2 * k, k));
      }
    
      @AndroidIncompatible // slow
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/DoubleMathTest.java

            assertTrue(isInBounds);
          } catch (ArithmeticException e) {
            assertFalse(isInBounds);
          }
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToInt(double, RoundingMode)
      public void testRoundExactFractionalDoubleToIntFails() {
        for (double d : FRACTIONAL_DOUBLE_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> DoubleMath.roundToInt(d, UNNECESSARY));
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

            assertTrue(isInBounds);
          } catch (ArithmeticException e) {
            assertFalse(isInBounds);
          }
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToInt(double, RoundingMode)
      public void testRoundExactFractionalDoubleToIntFails() {
        for (double d : FRACTIONAL_DOUBLE_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> DoubleMath.roundToInt(d, UNNECESSARY));
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/IntMathTest.java

        for (int x : POSITIVE_INTEGER_CANDIDATES) {
          for (int m : NEGATIVE_INTEGER_CANDIDATES) {
            assertThrows(ArithmeticException.class, () -> IntMath.mod(x, m));
          }
        }
      }
    
      public void testModZeroModulusFails() {
        for (int x : ALL_INTEGER_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> IntMath.mod(x, 0));
        }
      }
    
      public void testGCD() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/IntMathTest.java

        for (int x : POSITIVE_INTEGER_CANDIDATES) {
          for (int m : NEGATIVE_INTEGER_CANDIDATES) {
            assertThrows(ArithmeticException.class, () -> IntMath.mod(x, m));
          }
        }
      }
    
      public void testModZeroModulusFails() {
        for (int x : ALL_INTEGER_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> IntMath.mod(x, 0));
        }
      }
    
      public void testGCD() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Internal.java

    @ElementTypesAreNonnullByDefault
    final class Internal {
    
      /**
       * Returns the number of nanoseconds of the given duration without throwing or overflowing.
       *
       * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either
       * {@link Long#MAX_VALUE} or {@link Long#MIN_VALUE}. This behavior can be useful when decomposing
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 11 14:30:06 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/primitives/ReflectionFreeAssertThrows.java

      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
              .put(ArithmeticException.class, e -> e instanceof ArithmeticException)
              .put(
                  ArrayIndexOutOfBoundsException.class,
                  e -> e instanceof ArrayIndexOutOfBoundsException)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top