From 9596ef833824d3fd630db70e9c3f0a34c8a0fe9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Wed, 13 Nov 2024 13:32:19 +0100 Subject: [PATCH] gst: fix serde test for ObjectFlags::all() GStreamer 1.24 added `GST_OBJECT_FLAG_CONSTRUCTED`, so `ObjectFlags::all()` returns a different set depending on the version feature. Part-of: --- gstreamer/src/flag_serde.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gstreamer/src/flag_serde.rs b/gstreamer/src/flag_serde.rs index a64c0641c..a362afbe8 100644 --- a/gstreamer/src/flag_serde.rs +++ b/gstreamer/src/flag_serde.rs @@ -188,7 +188,13 @@ mod tests { ) ); check_serialize!(crate::MetaFlags::all(), "\"readonly+pooled+locked\""); - check_serialize!(crate::ObjectFlags::all(), "\"may-be-leaked+constructed\""); + cfg_if::cfg_if! { + if #[cfg(feature = "v1_24")] { + check_serialize!(crate::ObjectFlags::all(), "\"may-be-leaked+constructed\""); + } else { + check_serialize!(crate::ObjectFlags::all(), "\"may-be-leaked\""); + } + } check_serialize!( crate::PadFlags::all(), concat!(