test module
Maylang standard-library module.
import "test" as test;
Module note — Assertions record failures and keep running. Call test_summary to fail the program when any assertion failed. Counters are shared module state.
Functions
check
fun check(condition: Bool, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
assert_true
fun assert_true(condition: Bool, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
assert_equal
fun assert_equal<T>(actual: T, expected: T, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
assert_not_equal
fun assert_not_equal<T>(actual: T, unexpected: T, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
assert_contains
fun assert_contains<T>(haystack: Any, needle: T, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
assert_near
fun assert_near(actual: Float, expected: Float, tolerance: Float, label: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
test_summary
fun test_summary() -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Mutable constants
__passed
mut __passed: Int = 0;No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
__failed
mut __failed: Int = 0;No description yet. Read the declaration source for the exact contract.
supported · full runtime · source