Skip to content

The tear down function is not executed if a munit assertion fails in the test function #49

@freeekanayaka

Description

@freeekanayaka

If a tear down function is provided, and the associated test function executes a munit assertion like munit_assert_init(1, ==, 2), then the tear down function is not executed.

This might be a problem if some resources were allocated (e.g. temporary directories) which always need to be released.

Also, in case the test program is compiled with MUNIT_NO_FORK, then even non-persistent resources (like memory allocated by a setup function) could be leaked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions