Skip to content

consider linting test/run-pass/*.rs to ensure all have assert/assert_eq #23113

Closed
@pnkfelix

Description

@pnkfelix

spawned off of the story in #23112

We should consider making the compiletest system reject run-pass tests that contain no calls to assert! nor assert_eq!

(Better still would be to also reject if no such call is reached during an execution of the test, but that would probably require we add testing-specific assertion macros.)

We could add a comment flag to allow tests to opt out of this requirement (e.g. if they are regression tests that are indeed just checking that we do not segfault and do not have a clear assertion to include).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions