video/video_format: Expect a specific panic reason

This commit is contained in:
Marijn Suijten 2021-05-26 22:18:12 +02:00
parent a6d5f6f5a5
commit 110bfce7e6

View file

@ -467,7 +467,7 @@ mod tests {
}
#[test]
#[should_panic]
#[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");