Class Asserts
java.lang.Object
com.google.javascript.rhino.testing.Asserts
Helper methods for making assertions about the validity of types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
For the given equivalent types, run all type operations that should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc)static JSType
assertResolvesToSame
(JSType type) assertTypeCollectionEquals
(Iterable<T> a, Iterable<S> b) static void
assertTypeEquals
(JSType a, JSType b) static void
assertTypeEquals
(String message, JSType a, JSType b) static void
assertTypeNotEquals
(JSType a, JSType b) static void
assertTypeNotEquals
(String message, JSType a, JSType b) static JSType
assertValidResolve
(JSType type) static JSType
assertValidResolve
(JSType type, StaticScope<JSType> scope)
-
Method Details
-
assertResolvesToSame
-
assertValidResolve
- Returns:
- The resolved type
-
assertValidResolve
- Returns:
- The resolved type
-
assertTypeNotEquals
-
assertTypeNotEquals
-
assertTypeEquals
-
assertTypeEquals
-
assertTypeCollectionEquals
-
assertEquivalenceOperations
For the given equivalent types, run all type operations that should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc)
-