Skip to content

The std assert macros have a custom message which show as not covered in coverage #428

@dominikwilkowski

Description

@dominikwilkowski

Rusts assert macros have a custom message you can add which show up as missed lines in the coverage.

(I searched through issues and didn't find any previous mention, if I missed it feel free to close this.)

Now I don't think they should show up in the coverage at all and the entire test module should be ignored for coverage? Perhaps there are other views on this?

The docs talk about ignoring code via the [#[coverage(off)] attribute][rust-lang/rust#84605] attribute. I would have to include this for every test block. Perhaps tests should be ignored by default?

https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#exclude-code-from-coverage

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-upstream-bugCategory: This is a bug of compiler or dependencies (the fix may require action in the upstream)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions