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 TypeClassDescription(package private) static interface
Wrapping interface ofTestRule
to be used within truth.(package private) static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
cleanStackTrace
(Throwable throwable) (package private) static boolean
containsMatch
(String actual, 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
Tries to infer a name for the root actual value from the bytecode.(package private) static boolean
Tests if current platform is Android.private static boolean
(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 com.google.common.collect.ImmutableList<String>
splitLines
(String s)
-
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. If suppressed exceptions are not supported (pre-Java 1.7), an empty array will be returned. -
cleanStackTrace
-
inferDescription
Tries to infer a name for the root actual value from the bytecode. The "root" actual value is the value passed toassertThat
orthat
, as distinct from any later actual values produced by chaining calls likehasMessageThat
. -
makeDiff
-
splitLines
-
doubleToString
-
floatToString
-
getStackTraceAsString
Returns a human readable string representation of the throwable's stack trace. -
isAndroid
static boolean isAndroid()Tests if current platform is Android. -
isInferDescriptionDisabled
private static boolean isInferDescriptionDisabled()
-