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

@ -144,6 +144,20 @@ mod tests {
use try_from::TryFrom;
use minidom::Element;
#[test]
fn test_size() {
assert_size!(A, 4);
assert_size!(ResumeAttr, 1);
assert_size!(Enable, 12);
assert_size!(StreamId, 24);
assert_size!(Enabled, 64);
assert_size!(Failed, 12);
assert_size!(R, 0);
assert_size!(Resume, 32);
assert_size!(Resumed, 32);
assert_size!(StreamManagement, 0);
}
#[test]
fn a() {
let elem: Element = "<a xmlns='urn:xmpp:sm:3' h='5'".parse().unwrap();