scoop:scoop.test:0.1.0
scoop.test
API
-
annotation
AfterTest
Marks cleanup run after setup and body processing, including when either fails. Cleanup failures are retained separately from the primary failure.
-
class
AssertionFailure
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.
-
enum
AssertionValue
The outcome of rendering an assertion operand for a failure report.
-
annotation
BeforeTest
Marks the setup action run before a test body. A setup failure skips the body but still permits the after-test action.
-
annotation
Ignore
Marks a test case as ignored by default and records the reason shown by test reporting.
-
annotation
Test
Marks a test function or a class containing test cases for test-purpose compilation. With useProcess, each selected case runs in a fresh process, including setup and cleanup. A class-level setting applies to every case in that class.
-
function
assertEquals
Checks expected.equals(actual) using the type's declared or structurally available equality operation. Failure records expected and actual values when they can be rendered. See scoop example test/assertions for scalar, struct, tuple and Option comparisons.
-
function
assertFailsWith
Runs the block and returns the thrown exception if it has the requested type. Normal return or another exception type produces [AssertionFailure]; a mismatched exception is retained as its cause.
-
function
assertFalse
Throws [AssertionFailure] unless the condition is false. The default location records the assertion call site.
-
function
assertNotEquals
Fails if expected.equals(actual) is true, using the type's available equality operation and preserving the assertion call site.
-
function
assertNotSame
Throws [AssertionFailure] when both references identify the same object.
-
function
assertSame
Checks reference identity rather than value equality and throws [AssertionFailure] for different objects.
-
function
assertTrue
Throws [AssertionFailure] unless the condition is true. The default location records the assertion call site.
-
function
fail
Always throws [AssertionFailure] with the optional message and caller location.