Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testLog2ZeroAlwaysThrows (0.07 sec)

  1. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          // Checks for a single bit set.
          boolean expected = x.signum() > 0 & x.and(x.subtract(ONE)).equals(ZERO);
          assertEquals(expected, BigIntegerMath.isPowerOfTwo(x));
        }
      }
    
      public void testLog2ZeroAlwaysThrows() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertThrows(IllegalArgumentException.class, () -> BigIntegerMath.log2(ZERO, mode));
        }
      }
    
      public void testLog2NegativeAlwaysThrows() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Nov 19 01:35:24 UTC 2025
    - 27.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/IntMathTest.java

          BigInteger bigX = BigInteger.valueOf(x);
          boolean expected = (bigX.signum() > 0) && (bigX.bitCount() == 1);
          assertEquals(expected, IntMath.isPowerOfTwo(x));
        }
      }
    
      public void testLog2ZeroAlwaysThrows() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertThrows(IllegalArgumentException.class, () -> IntMath.log2(0, mode));
        }
      }
    
      public void testLog2NegativeAlwaysThrows() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 24.1K bytes
    - Viewed (0)
Back to top