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

@ -215,6 +215,18 @@ mod tests {
use try_from::TryFrom;
use minidom::Element;
#[test]
fn test_size() {
assert_size!(Mechanism, 1);
assert_size!(Auth, 32);
assert_size!(Challenge, 24);
assert_size!(Response, 24);
assert_size!(Abort, 0);
assert_size!(Success, 24);
assert_size!(DefinedCondition, 1);
assert_size!(Failure, 32);
}
#[test]
fn test_simple() {
let elem: Element = "<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'/>".parse().unwrap();