gst/log: log arg eval fix non regression test

This commit is contained in:
François Laignel 2022-09-18 17:12:14 +02:00 committed by François Laignel
parent 253ba03a7a
commit b8e1c25c85

View file

@ -745,4 +745,23 @@ mod tests {
info!(cat, obj: &obj, "meh2");
assert!(receiver.recv().is_err());
}
#[test]
fn no_argument_evaluation() {
crate::init().unwrap();
let cat = DebugCategory::new(
"no_argument_evaluation",
crate::DebugColorFlags::empty(),
Some("No Argument Evaluation debug category"),
);
let mut arg_evaluated = false;
trace!(cat, "{}", {
arg_evaluated = true;
"trace log"
});
assert!(!arg_evaluated);
}
}