Class Asserts

java.lang.Object
com.google.javascript.rhino.testing.Asserts

public class Asserts extends Object
Helper methods for making assertions about the validity of types.
  • Method Details

    • assertResolvesToSame

      public static JSType assertResolvesToSame(JSType type)
    • assertValidResolve

      public static JSType assertValidResolve(JSType type)
      Returns:
      The resolved type
    • assertValidResolve

      public static JSType assertValidResolve(JSType type, StaticScope<JSType> scope)
      Returns:
      The resolved type
    • assertTypeNotEquals

      public static void assertTypeNotEquals(JSType a, JSType b)
    • assertTypeNotEquals

      public static void assertTypeNotEquals(String message, JSType a, JSType b)
    • assertTypeEquals

      public static void assertTypeEquals(JSType a, JSType b)
    • assertTypeEquals

      public static void assertTypeEquals(String message, JSType a, JSType b)
    • assertTypeCollectionEquals

      public static <T extends JSType, S extends JSType> void assertTypeCollectionEquals(Iterable<T> a, Iterable<S> b)
    • assertEquivalenceOperations

      public static void assertEquivalenceOperations(JSType a, JSType b)
      For the given equivalent types, run all type operations that should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc)