From 1ef3bf52d20b54304e3d2f4c70b3b1118f725eae Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 11 Apr 2020 18:57:09 +0200 Subject: [PATCH] gstreamer: Add missing init calls in tests --- gstreamer/src/error.rs | 4 ++++ gstreamer/src/iterator.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gstreamer/src/error.rs b/gstreamer/src/error.rs index 890a072cd..58221d370 100644 --- a/gstreamer/src/error.rs +++ b/gstreamer/src/error.rs @@ -173,6 +173,8 @@ mod tests { #[test] fn error_message() { + ::init().unwrap(); + let e = ErrorMessage::new( &::CoreError::Failed, Some("message"), @@ -189,6 +191,8 @@ mod tests { #[test] fn logabble_error() { + ::init().unwrap(); + let e: LoggableError = glib::BoolError::new("msg", "filename", "function", 7).into(); assert_eq!( format!("{}", e), diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index 64ffaa4e1..b1da87f8e 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -742,6 +742,8 @@ mod tests { #[test] fn test_std() { + ::init().unwrap(); + let mut it = Iterator::from_vec(vec![1i32, 2, 3]).into_iter(); assert_eq!(it.next(), Some(Ok(1))); assert_eq!(it.next(), Some(Ok(2))); @@ -751,6 +753,8 @@ mod tests { #[test] fn test_into_iter() { + ::init().unwrap(); + let mut v = vec![1i32, 2, 3].into_iter(); for x in Iterator::from_vec(vec![1i32, 2, 3]) { assert_eq!(x.unwrap(), v.next().unwrap());