Package com.google.common.truth
Class Platform
java.lang.Object
com.google.common.truth.Platform
Extracted routines that need to be swapped in for GWT, to allow for minimal deltas between the
GWT and non-GWT version.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class(package private) static interfaceA GWT-swapped version of test rule interface that does nothing.private static interfaceprivate static class(package private) static classprivate static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcleanStackTrace(Throwable throwable) private static Platform.NativeRegExp(package private) static booleancontainsMatch(String subject, String regex) Determines if the given subject contains a match for the given regex.(package private) static StringdoubleToString(double value) (package private) static StringfloatToString(float value) (package private) static StringgetStackTraceAsString(Throwable throwable) Returns a human readable string representation of the throwable's stack trace.(package private) static Throwable[]getSuppressed(Throwable throwable) Returns an array containing all of the exceptions that were suppressed to deliver the given exception.(package private) static String(package private) static booleanTests if current platform is Android which is always false.(package private) static booleanisInstanceOfType(Object instance, Class<?> clazz) Returns true if the instance is assignable to the type Clazz.(package private) static com.google.common.collect.ImmutableList<Fact> private static StringtoLocaleString(double value)
-
Field Details
-
EXPECT_FAILURE_WARNING_IF_GWT
- See Also:
-
-
Constructor Details
-
Platform
private Platform()
-
-
Method Details
-
isInstanceOfType
Returns true if the instance is assignable to the type Clazz. -
containsMatch
Determines if the given subject contains a match for the given regex. -
getSuppressed
Returns an array containing all of the exceptions that were suppressed to deliver the given exception. Delegates to the getSuppressed() method on Throwable that is available in Java 1.7+ -
cleanStackTrace
-
inferDescription
-
makeDiff
-
doubleToString
-
floatToString
-
toLocaleString
-
isAndroid
static boolean isAndroid()Tests if current platform is Android which is always false. -
getStackTraceAsString
Returns a human readable string representation of the throwable's stack trace. -
compile
-