Package-level declarations

Types

Link copied to clipboard
actual typealias AssertionFailedError = org.opentest4j.AssertionFailedError

AssertionFailedError is a common base class for test-related AssertionErrors.

Link copied to clipboard
actual typealias FileInfo = org.opentest4j.FileInfo
expect open class FileInfo(path: String, contents: ByteArray)
actual open class FileInfo(val path: String, val contents: ByteArray)

FileInfo is a pair of a file path and the contents of the file.

Link copied to clipboard
actual typealias IncompleteExecutionException = org.opentest4j.IncompleteExecutionException

RuntimeException used to indicate that the execution of a test was incomplete — for example, that the execution was entirely skipped or aborted mid-stream. See subclasses for concrete use cases.

Link copied to clipboard
actual typealias MultipleFailuresError = org.opentest4j.MultipleFailuresError
expect open class MultipleFailuresError(heading: String?, failures: List<Throwable>) : AssertionError
actual open class MultipleFailuresError(heading: String?, val failures: List<Throwable>) : AssertionError

MultipleFailuresError is an AssertionError that aggregates multiple failures thrown in a given context (i.e., typically within the invocation of a single test).

Link copied to clipboard
actual typealias TestAbortedException = org.opentest4j.TestAbortedException

Specialization of IncompleteExecutionException used to indicate that a test was aborted during execution (e.g., due to a failed assumption).

Link copied to clipboard
actual typealias TestSkippedException = org.opentest4j.TestSkippedException

Specialization of IncompleteExecutionException used to indicate that a test was skipped prior to execution (e.g., disabled or ignored).

Link copied to clipboard
actual typealias ValueWrapper = org.opentest4j.ValueWrapper
expect class ValueWrapper
actual class ValueWrapper

Serializable representation of a value that was used in an assertion.

Serializable representation of a value that was used in an assertion.

Properties

Link copied to clipboard

Returns the wrapped actual value if it is defined; otherwise null.

Link copied to clipboard

Returns the contents of the file.

Link copied to clipboard

Returns the original value supplied to toValueWrapper.

Link copied to clipboard

Returns the wrapped expected value if it is defined; otherwise null.

Link copied to clipboard

Returns the list of failures contained in this error.

Link copied to clipboard

Returns the value's identity hash code.

Link copied to clipboard

Returns true if an actual value was supplied via an appropriate constructor.

Link copied to clipboard

Returns true if an expected value was supplied via an appropriate constructor.

Link copied to clipboard
expect val FileInfo.path: String
actual val FileInfo.path: String

Returns the path to the file.

Link copied to clipboard

Returns the value's string representation.

Link copied to clipboard
expect val ValueWrapper.value: Any?
actual val ValueWrapper.value: Any?

Returns the value supplied to toValueWrapper if the value java.io.Serializable (always true on js and native); otherwise, null.

Link copied to clipboard
expect val ValueWrapper.valueType: KClass<*>?
actual val ValueWrapper.valueType: KClass<*>?

Returns the value's runtime type or null if the value is null.

Functions

Link copied to clipboard
actual inline fun FileInfo.contentsAsString(): String

Returns the contents of the file as a String, assuming utf8

Link copied to clipboard
actual fun Any?.toValueWrapper(stringRepresentation: String?): ValueWrapper

Factory for creating a new ValueWrapper for the supplied value.

expect fun Any?.toValueWrapper(stringRepresentation: String?): ValueWrapper
actual fun Any?.toValueWrapper(stringRepresentation: String?): ValueWrapper

Factory for creating a new ValueWrapper for the supplied value using the supplied custom stringRepresentation.