gstreamer: Add missing init calls in tests

This commit is contained in:
Guillaume Gomez 2020-04-11 18:57:09 +02:00 committed by Sebastian Dröge
parent 6db70eaa4b
commit 1ef3bf52d2
2 changed files with 8 additions and 0 deletions

View file

@ -173,6 +173,8 @@ mod tests {
#[test] #[test]
fn error_message() { fn error_message() {
::init().unwrap();
let e = ErrorMessage::new( let e = ErrorMessage::new(
&::CoreError::Failed, &::CoreError::Failed,
Some("message"), Some("message"),
@ -189,6 +191,8 @@ mod tests {
#[test] #[test]
fn logabble_error() { fn logabble_error() {
::init().unwrap();
let e: LoggableError = glib::BoolError::new("msg", "filename", "function", 7).into(); let e: LoggableError = glib::BoolError::new("msg", "filename", "function", 7).into();
assert_eq!( assert_eq!(
format!("{}", e), format!("{}", e),

View file

@ -742,6 +742,8 @@ mod tests {
#[test] #[test]
fn test_std() { fn test_std() {
::init().unwrap();
let mut it = Iterator::from_vec(vec![1i32, 2, 3]).into_iter(); 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(1)));
assert_eq!(it.next(), Some(Ok(2))); assert_eq!(it.next(), Some(Ok(2)));
@ -751,6 +753,8 @@ mod tests {
#[test] #[test]
fn test_into_iter() { fn test_into_iter() {
::init().unwrap();
let mut v = vec![1i32, 2, 3].into_iter(); let mut v = vec![1i32, 2, 3].into_iter();
for x in Iterator::from_vec(vec![1i32, 2, 3]) { for x in Iterator::from_vec(vec![1i32, 2, 3]) {
assert_eq!(x.unwrap(), v.next().unwrap()); assert_eq!(x.unwrap(), v.next().unwrap());