Skip to content

Support multiple #[should_panic] invocations #155

@skogseth

Description

@skogseth

With the current implementation in #151 the #[should_panic] macro can only be applied once, annotating a function with multiple #[should_panic] invocations will lead to a compilation error. We could potentially support invoking this multiple times with different expected messages, and then succeeding if any of the expected messages are contained within the error message. Another option is to follow libtest, which simply ignores subsequent calls to #[should_panic].

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-pytestArea: pytest-like framework implemented on top of the new harnessC-questionUncertainty is involved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions