- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for testFactorialNegative (0.1 seconds)
-
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1)).isPositiveInfinity(); assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20)).isPositiveInfinity(); } public void testFactorialNegative() { for (int n : NEGATIVE_INTEGER_CANDIDATES) { assertThrows(IllegalArgumentException.class, () -> DoubleMath.factorial(n)); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Feb 03 16:20:39 GMT 2026 - 27.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
assertEquals(expected, BigIntegerMath.factorial(i)); } } public void testFactorial0() { assertEquals(BigInteger.ONE, BigIntegerMath.factorial(0)); } public void testFactorialNegative() { assertThrows(IllegalArgumentException.class, () -> BigIntegerMath.factorial(-1)); } public void testBinomialSmall() { runBinomialTest(0, 30); } @GwtIncompatible // too slow
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 04:51:56 GMT 2026 - 27.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1)).isPositiveInfinity(); assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20)).isPositiveInfinity(); } public void testFactorialNegative() { for (int n : NEGATIVE_INTEGER_CANDIDATES) { assertThrows(IllegalArgumentException.class, () -> DoubleMath.factorial(n)); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Feb 03 16:20:39 GMT 2026 - 27.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE; assertEquals(expectedInt, IntMath.factorial(n)); } } public void testFactorialNegative() { for (int n : NEGATIVE_INTEGER_CANDIDATES) { assertThrows(IllegalArgumentException.class, () -> IntMath.factorial(n)); } } // Depends on the correctness of BigIntegerMath.binomial.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 24.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE; assertEquals(expectedInt, IntMath.factorial(n)); } } public void testFactorialNegative() { for (int n : NEGATIVE_INTEGER_CANDIDATES) { assertThrows(IllegalArgumentException.class, () -> IntMath.factorial(n)); } } // Depends on the correctness of BigIntegerMath.binomial.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 24.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE; assertEquals(expectedLong, LongMath.factorial(n)); } } @GwtIncompatible // TODO public void testFactorialNegative() { for (int n : NEGATIVE_INTEGER_CANDIDATES) { assertThrows(IllegalArgumentException.class, () -> LongMath.factorial(n)); } } // Depends on the correctness of BigIntegerMath.binomial.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 31.4K bytes - Click Count (0)