Scoop API

scoop:scoop.test:0.1.0

AssertionFailure

class AssertionFailure

source · line 25
public
public class AssertionFailure public constructor(
    /**
     * The assertion operation that failed.
     */
    public val kind: String,
    /**
     * Additional caller-supplied context, when provided.
     */
    public val message: String?,
    /**
     * The source location attributed to the assertion failure.
     */
    public val location: SourceLocation,
    /**
     * The expected operand's rendering result.
     */
    public val expected: AssertionValue = AssertionValue.Unavailable,
    /**
     * The actual operand's rendering result.
     */
    public val actual: AssertionValue = AssertionValue.Unavailable,
    /**
     * An underlying exception, such as the unexpected exception from assertFailsWith.
     */
    public val cause: Throwable? = None
) : Throwable()

Structured assertion failure information used by the test runner. Operand-rendering failures are retained in AssertionValue so they do not hide the original comparison failure.

property kind

source · line 29
public
public val kind: String

get: public read-only

The assertion operation that failed.

property cause

source · line 49
public
public val cause: Throwable? = None

get: public read-only

An underlying exception, such as the unexpected exception from assertFailsWith.

property actual

source · line 45
public
public val actual: AssertionValue = AssertionValue.Unavailable

get: public read-only

The actual operand's rendering result.

property message

source · line 33
public
public val message: String?

get: public read-only

Additional caller-supplied context, when provided.

property location

source · line 37
public
public val location: SourceLocation

get: public read-only

The source location attributed to the assertion failure.

constructor constructor

source · line 25
public
constructor(public val kind: String, public val message: String?, public val location: SourceLocation, public val expected: AssertionValue = AssertionValue.Unavailable, public val actual: AssertionValue = AssertionValue.Unavailable, public val cause: Throwable? = None)

property expected

source · line 41
public
public val expected: AssertionValue = AssertionValue.Unavailable

get: public read-only

The expected operand's rendering result.