5 releases

0.2.2 Apr 21, 2024
0.2.1 Apr 21, 2024
0.2.0 Sep 14, 2023
0.1.1 Sep 13, 2023
0.1.0 May 29, 2022

#195 in Testing

Download history 253/week @ 2024-07-28 343/week @ 2024-08-04 371/week @ 2024-08-11 368/week @ 2024-08-18 387/week @ 2024-08-25 803/week @ 2024-09-01 906/week @ 2024-09-08 692/week @ 2024-09-15 1006/week @ 2024-09-22 821/week @ 2024-09-29 873/week @ 2024-10-06 1175/week @ 2024-10-13 1049/week @ 2024-10-20 774/week @ 2024-10-27 1009/week @ 2024-11-03 1092/week @ 2024-11-10

4,040 downloads per month
Used in 28 crates

Apache-2.0 OR MIT

15KB
179 lines

coverage-helper

crates.io docs.rs license msrv github actions

Helper for https://github.com/taiki-e/cargo-llvm-cov/issues/123.

Note: coverage-helper 0.2 supports #[coverage(off)]. See coverage-helper 0.1 for versions that support #[no_coverage].

Usage

Add this to your Cargo.toml:

[dev-dependencies]
coverage-helper = "0.1"

And add this to your crate root (lib.rs or main.rs):

#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]

Examples

use coverage_helper::test;

#[test]
fn my_test() {
    // ...
}

Expanded to:

#[cfg_attr(all(coverage_nightly, test), coverage(off))]
#[::core::prelude::v1::test]
fn my_test() {
    // ...
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps