std/testing
Index
struct T
fn Fail(*self)
fn Failed(*self): bool
fn Skip(*self)
fn Skipped(*self): bool
fn Assert(*self, expr: bool, message: str): bool
fn Errorf(*self, fmt: str, args: ...any)
fn Logf(*self, fmt: str, args: ...any)
T
struct T {
// NOTE: contains filtered hidden or unexported fields
}A test utility also used by the Jule runtime. It provides functionalities that facilitate the management and development of tests.
Fail
fn Fail(*self)Fails test. Does not breaks scope execution.
Failed
fn Failed(*self): boolReports whether test is failed.
Skip
fn Skip(*self)Skip test. Does not breaks scope execution.
Skipped
fn Skipped(*self): boolReports whether test is skipped.
Assert
fn Assert(*self, expr: bool, message: str): boolSet status of test as failure if expression is evaluated false at runtime.
Errorf
fn Errorf(*self, fmt: str, args: ...any)Set status of test as failure and print message by formatting. Prints new-line after formatted text. Uses "std/fmt" internally.
Logf
fn Logf(*self, fmt: str, args: ...any)Logs message with no error, test status will not be affected.