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());