forked from mirrors/gstreamer-rs
gstreamer: Add missing init calls in tests
This commit is contained in:
parent
6db70eaa4b
commit
1ef3bf52d2
2 changed files with 8 additions and 0 deletions
|
@ -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),
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue