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 interfaceWrapping interface ofTestRuleto be used within truth.(package private) static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcleanStackTrace(Throwable throwable) (package private) static booleancontainsMatch(String actual, 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 StringTries to infer a name for the root actual value from the bytecode.(package private) static booleanTests if current platform is Android.private static boolean(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 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 toassertThatorthat, 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()
-