Class MCTestCase

java.lang.Object
org.openjdk.jmc.test.MCTestCase

public class MCTestCase extends Object
TestCase extended with convenience assert methods.
  • Constructor Details

    • MCTestCase

      public MCTestCase()
  • Method Details

    • assertNull

      public static void assertNull(String message, Object object)
      Shadowing Assert.assertNull(String, Object) to provide a more useful error message.
    • assertNull

      public static void assertNull(Object object)
      Shadowing Assert.assertNull(Object) to provide a more useful error message.
    • failNotEquals

      public static void failNotEquals(String message, Object expected, Object actual)
    • assertMaskedEquals

      public static void assertMaskedEquals(String message, long expected, long actual, long mask)
      Asserts that with respect to all bits in the mask, a long is equal to the given value. If it is not an AssertionFailedError is thrown with the given message.
    • assertMaskedEquals

      public static void assertMaskedEquals(long expected, long actual, long mask)
      Asserts that with respect to all bits in the mask, a long is equal to the given value.
    • hex

      protected static String hex(long val)
    • assertBetween

      public static <T extends Comparable<T>> void assertBetween(String message, T min, T max, T actual)
      Asserts that a Comparable is within the given (inclusive) range. If it is not an AssertionFailedError is thrown with the given message.
    • assertBetween

      public static <T extends Comparable<T>> void assertBetween(T min, T max, T actual)
      Asserts that a Comparable is within the given (inclusive) range.
    • assertMax

      public static <T extends Comparable<T>> void assertMax(String message, T max, T actual)
      Asserts that a Comparable is less or equal than the given value. If it is not an AssertionFailedError is thrown with the given message.
    • assertMax

      public static <T extends Comparable<T>> void assertMax(T max, T actual)
      Asserts that a Comparable is less or equal than the given value.
    • assertMin

      public static <T extends Comparable<T>> void assertMin(String message, T min, T actual)
      Asserts that a Comparable is greater or equal than the given value. If it is not an AssertionFailedError is thrown with the given message.
    • assertMin

      public static <T extends Comparable<T>> void assertMin(T min, T actual)
      Asserts that a Comparable is greater or equal than the given value.
    • assertLessThan

      public static <T extends Comparable<T>> void assertLessThan(String message, T greaterVal, T actual)
      Asserts that a Comparable is less than the given value. If it is not an AssertionFailedError is thrown with the given message.
    • assertLessThan

      public static <T extends Comparable<T>> void assertLessThan(T greaterVal, T actual)
      Asserts that a Comparable is less than the given value.
    • assertGreaterThan

      public static <T extends Comparable<? super T>> void assertGreaterThan(String message, T lesserVal, T actual)
      Asserts that a Comparable is greater than the given value. If it is not an AssertionFailedError is thrown with the given message.
    • assertGreaterThan

      public static <T extends Comparable<? super T>> void assertGreaterThan(T lesserVal, T actual)
      Asserts that a Comparable is greater than the given value.
    • assertArrayEqualsWithMoreInfo

      public static void assertArrayEqualsWithMoreInfo(String message, Object[] expecteds, Object[] actuals)
    • skipIfEarlierThan8u0

      protected void skipIfEarlierThan8u0()
    • skipIfEarlierThan7u40

      protected void skipIfEarlierThan7u40()
    • skipIfEarlierThan7u4

      protected void skipIfEarlierThan7u4()
    • skipIfEarlierThan7u0

      protected void skipIfEarlierThan7u0()