Test the size of every struct defined here.
This commit is contained in:
parent
9cb4f00341
commit
40aedcf184
43 changed files with 295 additions and 0 deletions
12
src/disco.rs
12
src/disco.rs
|
|
@ -235,6 +235,18 @@ mod tests {
|
|||
use compare_elements::NamespaceAwareCompare;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Identity, 96);
|
||||
assert_size!(Feature, 24);
|
||||
assert_size!(DiscoInfoQuery, 24);
|
||||
assert_size!(DiscoInfoResult, 96);
|
||||
|
||||
assert_size!(Item, 120);
|
||||
assert_size!(DiscoItemsQuery, 24);
|
||||
assert_size!(DiscoItemsResult, 48);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_simple() {
|
||||
let elem: Element = "<query xmlns='http://jabber.org/protocol/disco#info'><identity category='client' type='pc'/><feature var='http://jabber.org/protocol/disco#info'/></query>".parse().unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue