diff --git a/Cargo.toml b/Cargo.toml index 1a6df4fd6..fa0c6fd3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,7 @@ webbrowser = "0.8.10" urlencoding = "2.1.2" cool_asserts = "2.0.3" paste = "1.0" +coverage-helper = "0.2.0" [[bench]] name = "bench_main" diff --git a/src/hugr/validate/test.rs b/src/hugr/validate/test.rs index 75c02d463..07cbc6a75 100644 --- a/src/hugr/validate/test.rs +++ b/src/hugr/validate/test.rs @@ -1,4 +1,5 @@ use cool_asserts::assert_matches; +use coverage_helper::test; use super::*; use crate::builder::test::closed_dfg_root_hugr; diff --git a/src/lib.rs b/src/lib.rs index 80a7b8edd..eb8a354a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,9 @@ // Unstable check, may cause false positives. // https://github.com/rust-lang/rust-clippy/issues/5112 #![warn(clippy::debug_assert_with_mut_call)] +// https://crates.io/crates/coverage-helper to allow selectively ignoring tests +// in coverage. +#![cfg_attr(coverage_nightly, feature(coverage_attribute))] pub mod algorithm; pub mod builder;