#[path = "common/support.rs"]
mod common;
#[cfg(test)]
pub mod tests {
use crate::common::example::Example;
fn run(features: &str) -> String {
Example::new("test-tokio-async", "function_sink")
.features(features)
.env("HOTPATH_METRICS_SERVER_OFF", "true")
.stdout()
}
#[test]
fn test_function_sink_timing() {
assert!(run("hotpath-sink").contains("function_sink ok: 132 events"));
}
#[test]
fn test_function_sink_alloc() {
assert!(run("hotpath-alloc,hotpath-sink").contains("function_sink ok: 132 events"));
}
#[test]
fn test_function_sink_off_without_feature() {
assert!(run("hotpath").contains("function_sink ok: 0 events"));
}
}