Http module

end_failure_capture

procedure · 1 overloadSource

Ends a begin_failure_capture and returns the failure text collected since, in the temporary allocator, and how many expectations failed. Failures that were captured are not counted against the run.

Example
main :: () {
    begin_failure_capture();
    expect_equal(1, 2, "numbers");
    text, count := end_failure_capture();

    assert(count == 1);
    assert(text.count > 0);
}

Doesn't run in the browser (skipped on wasm).

end_failure_capture :: () -> (string, int)

Ends a begin_failure_capture and returns the failure text collected since, in the temporary allocator, and how many expectations failed. Failures that were captured are not counted against the run.

Returns

string
int
Example
main :: () {
    begin_failure_capture();
    expect_equal(1, 2, "numbers");
    text, count := end_failure_capture();

    assert(count == 1);
    assert(text.count > 0);
}

Doesn't run in the browser (skipped on wasm).

See also