Class Asserts
- java.lang.Object
-
- com.google.javascript.rhino.testing.Asserts
-
public class Asserts extends java.lang.ObjectHelper methods for making assertions about the validity of types.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertEquivalenceOperations(JSType a, JSType b)For the given equivalent types, run all type operations that should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc)static JSTypeassertResolvesToSame(JSType type)static <T extends JSType,S extends JSType>
voidassertTypeCollectionEquals(java.lang.Iterable<T> a, java.lang.Iterable<S> b)static voidassertTypeEquals(JSType a, JSType b)static voidassertTypeEquals(java.lang.String message, JSType a, JSType b)static voidassertTypeNotEquals(JSType a, JSType b)static voidassertTypeNotEquals(java.lang.String message, JSType a, JSType b)static JSTypeassertValidResolve(JSType type)static JSTypeassertValidResolve(JSType type, StaticScope<JSType> scope)
-
-
-
Method Detail
-
assertValidResolve
public static JSType assertValidResolve(JSType type, StaticScope<JSType> scope)
- Returns:
- The resolved type
-
assertTypeNotEquals
public static void assertTypeNotEquals(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)
-
-