FileInfo

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.

Its main use case is for `actual` and `expected` values in [AssertionFailedError].

The semantics of the `path` can be defined by the users of this class.

Author

Marc Philipp

Reinhold Degenfellner

Since

1.3

Author

Marc Philipp

Reinhold Degenfellner

Since

1.3

Constructors

Link copied to clipboard
expect constructor(path: String, contents: ByteArray)
actual constructor(path: String, contents: ByteArray)

Properties

Link copied to clipboard
Link copied to clipboard

Returns the contents of the file.

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

Returns the path to the file.

Functions

Link copied to clipboard
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
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String