mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 19:41:09 +00:00
gst/log: log arg eval fix non regression test
This commit is contained in:
parent
253ba03a7a
commit
b8e1c25c85
1 changed files with 19 additions and 0 deletions
|
@ -745,4 +745,23 @@ mod tests {
|
||||||
info!(cat, obj: &obj, "meh2");
|
info!(cat, obj: &obj, "meh2");
|
||||||
assert!(receiver.recv().is_err());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue