5个版本
0.2.2 | 2024年4月21日 |
---|---|
0.2.1 | 2024年4月21日 |
0.2.0 | 2023年9月14日 |
0.1.1 | 2023年9月13日 |
0.1.0 | 2022年5月29日 |
145 在 测试 中排名
每月下载量 1,766
在 11 crates 中使用
15KB
179 行
coverage-helper
辅助工具用于https://github.com/taiki-e/cargo-llvm-cov/issues/123。
注意: coverage-helper 0.2支持#[coverage(off)]
。有关支持#[no_coverage]
的版本,请参阅coverage-helper 0.1。
使用方法
将以下内容添加到您的Cargo.toml
[dev-dependencies]
coverage-helper = "0.1"
并将以下内容添加到您的crate根目录(lib.rs
或main.rs
)
#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
示例
use coverage_helper::test;
#[test]
fn my_test() {
// ...
}
扩展为
#[cfg_attr(all(coverage_nightly, test), coverage(off))]
#[::core::prelude::v1::test]
fn my_test() {
// ...
}
许可证
在您的选择下,根据Apache License, Version 2.0或MIT许可证授权。
除非您明确声明,否则根据Apache-2.0许可证定义,您有意提交以包含在作品中的任何贡献,均应根据上述许可证进行双重授权,不得添加任何附加条款或条件。