#[cfg(feature = "failpoints")]
#[macro_export]
macro_rules! fail_point {
($name:expr) => {
fail::fail_point!($name)
};
($name:expr, $closure:expr) => {
fail::fail_point!($name, $closure)
};
}
#[cfg(not(feature = "failpoints"))]
#[macro_export]
macro_rules! fail_point {
($name:expr) => {
()
};
($name:expr, $closure:expr) => {
()
};
}
#[cfg(test)]
mod tests {
#[cfg(feature = "failpoints")]
#[test]
fn fail_point_is_reachable() {
crate::fail_point!("test::point");
}
#[cfg(not(feature = "failpoints"))]
#[test]
fn fail_point_is_a_noop() {
crate::fail_point!("test::point");
}
}