From be1972e36c3f4012f7ae56f688efb1822e118399 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Mon, 13 May 2019 16:38:38 +0200 Subject: [PATCH] test: pull in constants for message types into tests --- src/dc_msg.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/dc_msg.rs b/src/dc_msg.rs index cf227b693..dbc31b677 100644 --- a/src/dc_msg.rs +++ b/src/dc_msg.rs @@ -1,4 +1,4 @@ -use crate::constants::Event; +use crate::constants::*; use crate::dc_chat::*; use crate::dc_contact::*; use crate::dc_context::*; @@ -1633,7 +1633,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 40); + assert_eq!(type_0, DC_MSG_AUDIO as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1647,7 +1647,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 40); + assert_eq!(type_0, DC_MSG_AUDIO as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1661,7 +1661,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 50); + assert_eq!(type_0, DC_MSG_VIDEO as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1675,7 +1675,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 20); + assert_eq!(type_0, DC_MSG_IMAGE as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1689,7 +1689,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 20); + assert_eq!(type_0, DC_MSG_IMAGE as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1703,7 +1703,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 20); + assert_eq!(type_0, DC_MSG_IMAGE as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1717,7 +1717,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 20); + assert_eq!(type_0, DC_MSG_IMAGE as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1731,7 +1731,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 21); + assert_eq!(type_0, DC_MSG_GIF as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str() @@ -1745,7 +1745,7 @@ mod tests { &mut type_0, &mut mime_0, ); - assert_eq!(type_0, 60); + assert_eq!(type_0, DC_MSG_FILE as libc::c_int); assert_eq!( CStr::from_ptr(mime_0 as *const libc::c_char) .to_str()