pbutils: Fix PbUtilsCapsDescriptionFlags serde (de)serialization tests

This commit is contained in:
Sebastian Dröge 2022-06-30 12:42:37 +03:00
parent 65629426cb
commit f30fcbcf9a

View file

@ -36,7 +36,12 @@ mod tests {
gst::init().unwrap(); gst::init().unwrap();
check_serialize!(crate::DiscovererSerializeFlags::all(), "\"caps+tags+misc\""); check_serialize!(crate::DiscovererSerializeFlags::all(), "\"caps+tags+misc\"");
#[cfg(feature = "v1_20")] #[cfg(feature = "v1_22")]
check_serialize!(
crate::PbUtilsCapsDescriptionFlags::all(),
"\"container+audio+video+image+subtitle+tag+generic+metadata\""
);
#[cfg(all(feature = "v1_20", not(feature = "v1_22")))]
check_serialize!( check_serialize!(
crate::PbUtilsCapsDescriptionFlags::all(), crate::PbUtilsCapsDescriptionFlags::all(),
"\"container+audio+video+image+subtitle+tag+generic\"" "\"container+audio+video+image+subtitle+tag+generic\""
@ -52,7 +57,13 @@ mod tests {
crate::DiscovererSerializeFlags::all(), crate::DiscovererSerializeFlags::all(),
"\"caps+tags+misc\"" "\"caps+tags+misc\""
); );
#[cfg(feature = "v1_20")] #[cfg(feature = "v1_22")]
check_deserialize!(
crate::PbUtilsCapsDescriptionFlags,
crate::PbUtilsCapsDescriptionFlags::all(),
"\"container+audio+video+image+subtitle+tag+generic+metadata\""
);
#[cfg(all(feature = "v1_20", not(feature = "v1_22")))]
check_deserialize!( check_deserialize!(
crate::PbUtilsCapsDescriptionFlags, crate::PbUtilsCapsDescriptionFlags,
crate::PbUtilsCapsDescriptionFlags::all(), crate::PbUtilsCapsDescriptionFlags::all(),