package core:testing

⌘K
Ctrl+K
or
/

    Index

    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    Internal_Cleanup ¶

    Internal_Cleanup :: struct {
    	procedure: proc(_: rawptr),
    	user_data: rawptr,
    }

    Internal_Test ¶

    Internal_Test :: struct {
    	pkg:  string,
    	name: string,
    	p:    Test_Signature,
    }
     

    IMPORTANT NOTE: Compiler requires this layout

    T ¶

    T :: struct {
    	error_count: int,
    	w:           io.Stream,
    	cleanups:    [dynamic]Internal_Cleanup,
    	_fail_now:   proc() -> !,
    }
    Related Procedures With Parameters

    Test_Signature ¶

    Test_Signature :: proc(_: ^T)
     

    IMPORTANT NOTE: Compiler requires this layout

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    cleanup ¶

    cleanup :: proc(t: ^T, procedure: proc(_: rawptr), user_data: rawptr) {…}
     

    cleanup registers a procedure and user_data, which will be called when the test, and all its subtests, complete cleanup procedures will be called in LIFO (last added, first called) order.

    error ¶

    error :: proc(t: ^T, args: ..any, loc := #caller_location) {…}

    errorf ¶

    errorf :: proc(t: ^T, format: string, args: ..any, loc := #caller_location) {…}

    expect ¶

    expect :: proc(t: ^T, ok: bool, msg: string = "", loc := #caller_location) -> bool {…}

    expect_value ¶

    expect_value :: proc(t: ^T, value, expected: $T, loc := #caller_location) -> bool {…}

    expectf ¶

    expectf :: proc(t: ^T, ok: bool, format: string, args: ..any, loc := #caller_location) -> bool {…}

    fail ¶

    fail :: proc(t: ^T, loc := #caller_location) {…}

    fail_now ¶

    fail_now :: proc(t: ^T, msg: string = "", loc := #caller_location) {…}

    failed ¶

    failed :: proc(t: ^T) -> bool {…}

    log ¶

    log :: proc(t: ^T, args: ..any, loc := #caller_location) {…}

    logf ¶

    logf :: proc(t: ^T, format: string, args: ..any, loc := #caller_location) {…}

    set_fail_timeout ¶

    set_fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-03 (vendor "odin") Windows_amd64 @ 2024-03-01 21:10:24.200103600 +0000 UTC