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