coverage-helper

Crates.iocoverage-helper
lib.rscoverage-helper
version0.2.2
sourcesrc
created_at2022-05-29 02:57:11.099321
updated_at2024-04-21 05:25:29.414939
descriptionHelper for .
homepage
repositoryhttps://github.com/taiki-e/coverage-helper
max_upload_size
id596180
size27,635
Taiki Endo (taiki-e)

documentation

README

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.

Commit count: 119

cargo fmt