use super::{Format, RenderOptions};
use crate::merge::CrapEntry;
use std::path::PathBuf;
pub(crate) fn opts(
threshold: f64,
format: Format,
) -> RenderOptions<'static> {
RenderOptions {
threshold,
format,
..Default::default()
}
}
pub(crate) fn sample() -> Vec<CrapEntry> {
vec![
CrapEntry {
file: PathBuf::from("a.rs"),
function: "clean".into(),
line: 1,
cyclomatic: 1.0,
coverage: Some(100.0),
crap: 1.0,
crate_name: None,
},
CrapEntry {
file: PathBuf::from("a.rs"),
function: "crappy".into(),
line: 10,
cyclomatic: 10.0,
coverage: Some(0.0),
crap: 110.0,
crate_name: None,
},
]
}