Test the size of every struct defined here.

This commit is contained in:
Emmanuel Gil Peyrot 2018-10-26 14:26:16 +02:00
commit 40aedcf184
43 changed files with 295 additions and 0 deletions

View file

@ -533,6 +533,20 @@ impl From<Jingle> for Element {
mod tests {
use super::*;
#[test]
fn test_size() {
assert_size!(Action, 1);
assert_size!(Creator, 1);
assert_size!(Senders, 1);
assert_size!(Disposition, 1);
assert_size!(ContentId, 24);
assert_size!(Content, 344);
assert_size!(Reason, 1);
assert_size!(ReasonElement, 32);
assert_size!(SessionId, 24);
assert_size!(Jingle, 256);
}
#[test]
fn test_simple() {
let elem: Element = "<jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' sid='coucou'/>".parse().unwrap();