Class Asserts


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

      • assertResolvesToSame

        public static JSType assertResolvesToSame​(JSType type)
      • assertValidResolve

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

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

        public static void assertTypeNotEquals​(java.lang.String message,
                                               JSType a,
                                               JSType b)
      • assertTypeEquals

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

        public static void assertTypeEquals​(java.lang.String message,
                                            JSType a,
                                            JSType b)
      • assertTypeCollectionEquals

        public static <T extends JSType,​S extends JSType> void assertTypeCollectionEquals​(java.lang.Iterable<T> a,
                                                                                                java.lang.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)