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 interface
A GWT-swapped version of test rule interface that does nothing.private static interface
private static class
(package private) static class
private static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
cleanStackTrace
(Throwable throwable) private static Platform.NativeRegExp
(package private) static boolean
containsMatch
(String subject, String regex) Determines if the given subject contains a match for the given regex.(package private) static String
doubleToString
(double value) (package private) static String
floatToString
(float value) (package private) static String
getStackTraceAsString
(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 boolean
Tests if current platform is Android which is always false.(package private) static boolean
isInstanceOfType
(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 String
toLocaleString
(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
-