xmpp-parsers: Add missing size tests for MUC
skip-changelog: This is just about testing.
This commit is contained in:
parent
c497967b1c
commit
772a326053
2 changed files with 44 additions and 0 deletions
|
|
@ -104,6 +104,20 @@ mod tests {
|
|||
use minidom::Element;
|
||||
use xso::error::{Error, FromElementError};
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(History, 40);
|
||||
assert_size!(Muc, 52);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(History, 40);
|
||||
assert_size!(Muc, 64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_muc_simple() {
|
||||
let elem: Element = "<x xmlns='http://jabber.org/protocol/muc'/>"
|
||||
|
|
|
|||
|
|
@ -346,6 +346,36 @@ mod tests {
|
|||
use minidom::Element;
|
||||
use xso::error::{Error, FromElementError};
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Status, 1);
|
||||
assert_size!(Actor, 28);
|
||||
assert_size!(Continue, 12);
|
||||
assert_size!(Reason, 12);
|
||||
assert_size!(Affiliation, 1);
|
||||
assert_size!(Role, 1);
|
||||
assert_size!(Item, 84);
|
||||
assert_size!(Invite, 44);
|
||||
assert_size!(Decline, 44);
|
||||
assert_size!(MucUser, 112);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Status, 1);
|
||||
assert_size!(Actor, 56);
|
||||
assert_size!(Continue, 24);
|
||||
assert_size!(Reason, 24);
|
||||
assert_size!(Affiliation, 1);
|
||||
assert_size!(Role, 1);
|
||||
assert_size!(Item, 168);
|
||||
assert_size!(Invite, 88);
|
||||
assert_size!(Decline, 88);
|
||||
assert_size!(MucUser, 224);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_simple() {
|
||||
let elem: Element = "<x xmlns='http://jabber.org/protocol/muc#user'/>"
|
||||
|
|
|
|||
Loading…
Reference in a new issue