Compare commits

...

3 commits

Author SHA1 Message Date
Sebastian Dröge 2671c0fffe Merge branch '0.22-backports' into '0.22'
0.22 backports

See merge request gstreamer/gstreamer-rs!1430
2024-04-27 16:31:36 +00:00
Sebastian Dröge 0bf0086c66 audio: video: Improve Display trait impl test for AudioFormat and Video a bit 2024-04-27 19:29:52 +03:00
Sebastian Dröge 05adb6b331 video: Remove nonsensical test
Printing an unknown video format returns NULL, and with latest git main
this actually causes a critical warning in addition.
2024-04-27 19:29:51 +03:00
2 changed files with 4 additions and 9 deletions

View file

@ -364,7 +364,8 @@ mod tests {
fn test_display() {
gst::init().unwrap();
format!("{}", crate::AudioFormat::S16be);
assert_eq!(format!("{}", crate::AudioFormat::S16be), "S16BE");
assert_eq!(format!("{:?}", crate::AudioFormat::S16be), "S16be");
}
#[test]

View file

@ -480,18 +480,12 @@ mod tests {
);
}
#[test]
#[should_panic(expected = "gst_video_format_to_string returned NULL")]
fn enum_to_string_panics() {
assert_eq!(&format!("{}", crate::VideoFormat::__Unknown(-1)), "UNKNOWN");
assert_eq!(crate::VideoFormat::__Unknown(-1).to_str(), "UNKNOWN");
}
#[test]
fn test_display() {
gst::init().unwrap();
format!("{}", crate::VideoFormat::Nv16);
assert_eq!(format!("{}", crate::VideoFormat::Nv16), "NV16");
assert_eq!(format!("{:?}", crate::VideoFormat::Nv16), "Nv16");
}
#[test]