#coverage #attributes #macro

macro dev coverage-helper

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

3 unstable releases

0.2.0 Sep 14, 2023
0.1.1 Sep 13, 2023
0.1.0 May 29, 2022

#228 in Testing

Download history 2386/week @ 2023-11-30 4229/week @ 2023-12-07 2473/week @ 2023-12-14 3855/week @ 2023-12-21 1675/week @ 2023-12-28 2380/week @ 2024-01-04 4100/week @ 2024-01-11 3585/week @ 2024-01-18 3320/week @ 2024-01-25 2329/week @ 2024-02-01 2356/week @ 2024-02-08 3582/week @ 2024-02-15 1901/week @ 2024-02-22 1548/week @ 2024-02-29 2163/week @ 2024-03-07 2163/week @ 2024-03-14

8,110 downloads per month
Used in 10 crates

Apache-2.0 OR MIT

11KB
176 lines

coverage-helper

crates.io docs.rs license rustc build status

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(coverage_nightly, feature(coverage_attribute))]

Examples

use coverage_helper::test;

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

Expanded to:

#[cfg_attr(coverage_nightly, 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