diff --git a/src/jingle_ice_udp.rs b/src/jingle_ice_udp.rs index 8cb47da8..40a07a62 100644 --- a/src/jingle_ice_udp.rs +++ b/src/jingle_ice_udp.rs @@ -90,6 +90,22 @@ mod tests { use minidom::Element; use try_from::TryFrom; + #[cfg(target_pointer_width = "32")] + #[test] + fn test_size() { + assert_size!(Transport, 36); + assert_size!(Type, 1); + assert_size!(Candidate, 72); + } + + #[cfg(target_pointer_width = "64")] + #[test] + fn test_size() { + assert_size!(Transport, 72); + assert_size!(Type, 1); + assert_size!(Candidate, 104); + } + #[test] fn test_simple() { let elem: Element = " diff --git a/src/jingle_rtp.rs b/src/jingle_rtp.rs index 95194edc..366cfeec 100644 --- a/src/jingle_rtp.rs +++ b/src/jingle_rtp.rs @@ -78,6 +78,24 @@ mod tests { use minidom::Element; use try_from::TryFrom; + #[cfg(target_pointer_width = "32")] + #[test] + fn test_size() { + assert_size!(Description, 36); + assert_size!(Channels, 1); + assert_size!(PayloadType, 52); + assert_size!(Parameter, 24); + } + + #[cfg(target_pointer_width = "64")] + #[test] + fn test_size() { + assert_size!(Description, 72); + assert_size!(Channels, 1); + assert_size!(PayloadType, 80); + assert_size!(Parameter, 48); + } + #[test] fn test_simple() { let elem: Element = "