Skip to content

allow tests to fail #8629

@andrewrk

Description

@andrewrk

I propose to modify the default test runner so that when a test returns an error, the test is marked as failure, however subsequent tests are still run. At the end will be reported the failures and successes, and the final exit code of zig test will be 0 if and only if all tests succeeded with no memory leaks.

Follow-up proposal: modify std.testing.expectEqual and similar functions to return error.ZigTestFailed rather than calling panic.

Motivation is to increase developer iteration speed; it might help to find out more than one thing is broken at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions