mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
xmpp-parsers: Fix size tests on 32-bit
This commit is contained in:
parent
91736ec0ed
commit
c7887efbc7
22 changed files with 25 additions and 25 deletions
|
@ -143,7 +143,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(BindQuery, 12);
|
assert_size!(BindQuery, 12);
|
||||||
assert_size!(BindResponse, 36);
|
assert_size!(BindResponse, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -76,7 +76,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Conference, 64);
|
assert_size!(Conference, 56);
|
||||||
assert_size!(Url, 24);
|
assert_size!(Url, 24);
|
||||||
assert_size!(Storage, 24);
|
assert_size!(Storage, 24);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ mod tests {
|
||||||
assert_size!(Enable, 0);
|
assert_size!(Enable, 0);
|
||||||
assert_size!(Disable, 0);
|
assert_size!(Disable, 0);
|
||||||
assert_size!(Private, 0);
|
assert_size!(Private, 0);
|
||||||
assert_size!(Received, 212);
|
assert_size!(Received, 152);
|
||||||
assert_size!(Sent, 212);
|
assert_size!(Sent, 152);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -41,7 +41,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Delay, 68);
|
assert_size!(Delay, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -241,7 +241,7 @@ mod tests {
|
||||||
assert_size!(DiscoInfoQuery, 12);
|
assert_size!(DiscoInfoQuery, 12);
|
||||||
assert_size!(DiscoInfoResult, 48);
|
assert_size!(DiscoInfoResult, 48);
|
||||||
|
|
||||||
assert_size!(Item, 64);
|
assert_size!(Item, 44);
|
||||||
assert_size!(DiscoItemsQuery, 12);
|
assert_size!(DiscoItemsQuery, 12);
|
||||||
assert_size!(DiscoItemsResult, 24);
|
assert_size!(DiscoItemsResult, 24);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Forwarded, 212);
|
assert_size!(Forwarded, 152);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -233,8 +233,8 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(IqType, 120);
|
assert_size!(IqType, 96);
|
||||||
assert_size!(Iq, 212);
|
assert_size!(Iq, 148);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -48,7 +48,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(JidPrepQuery, 12);
|
assert_size!(JidPrepQuery, 12);
|
||||||
assert_size!(JidPrepResponse, 40);
|
assert_size!(JidPrepResponse, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -689,11 +689,11 @@ mod tests {
|
||||||
assert_size!(Senders, 1);
|
assert_size!(Senders, 1);
|
||||||
assert_size!(Disposition, 1);
|
assert_size!(Disposition, 1);
|
||||||
assert_size!(ContentId, 12);
|
assert_size!(ContentId, 12);
|
||||||
assert_size!(Content, 228);
|
assert_size!(Content, 220);
|
||||||
assert_size!(Reason, 1);
|
assert_size!(Reason, 1);
|
||||||
assert_size!(ReasonElement, 16);
|
assert_size!(ReasonElement, 16);
|
||||||
assert_size!(SessionId, 12);
|
assert_size!(SessionId, 12);
|
||||||
assert_size!(Jingle, 152);
|
assert_size!(Jingle, 112);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -121,7 +121,7 @@ mod tests {
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Transport, 68);
|
assert_size!(Transport, 68);
|
||||||
assert_size!(Type, 1);
|
assert_size!(Type, 1);
|
||||||
assert_size!(Candidate, 92);
|
assert_size!(Candidate, 88);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -66,7 +66,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Transport, 12);
|
assert_size!(Transport, 12);
|
||||||
assert_size!(Candidate, 40);
|
assert_size!(Candidate, 36);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -285,7 +285,7 @@ mod tests {
|
||||||
assert_size!(Mode, 1);
|
assert_size!(Mode, 1);
|
||||||
assert_size!(CandidateId, 12);
|
assert_size!(CandidateId, 12);
|
||||||
assert_size!(StreamId, 12);
|
assert_size!(StreamId, 12);
|
||||||
assert_size!(Candidate, 84);
|
assert_size!(Candidate, 60);
|
||||||
assert_size!(TransportPayload, 16);
|
assert_size!(TransportPayload, 16);
|
||||||
assert_size!(Transport, 44);
|
assert_size!(Transport, 44);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ mod tests {
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(QueryId, 12);
|
assert_size!(QueryId, 12);
|
||||||
assert_size!(Query, 116);
|
assert_size!(Query, 116);
|
||||||
assert_size!(Result_, 236);
|
assert_size!(Result_, 176);
|
||||||
assert_size!(Complete, 1);
|
assert_size!(Complete, 1);
|
||||||
assert_size!(Fin, 44);
|
assert_size!(Fin, 44);
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,7 +308,7 @@ mod tests {
|
||||||
assert_size!(Body, 12);
|
assert_size!(Body, 12);
|
||||||
assert_size!(Subject, 12);
|
assert_size!(Subject, 12);
|
||||||
assert_size!(Thread, 12);
|
assert_size!(Thread, 12);
|
||||||
assert_size!(Message, 144);
|
assert_size!(Message, 104);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -385,7 +385,7 @@ mod tests {
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Show, 1);
|
assert_size!(Show, 1);
|
||||||
assert_size!(Type, 1);
|
assert_size!(Type, 1);
|
||||||
assert_size!(Presence, 120);
|
assert_size!(Presence, 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -102,7 +102,7 @@ mod tests {
|
||||||
assert_size!(Group, 12);
|
assert_size!(Group, 12);
|
||||||
assert_size!(Subscription, 1);
|
assert_size!(Subscription, 1);
|
||||||
assert_size!(Ask, 1);
|
assert_size!(Ask, 1);
|
||||||
assert_size!(Item, 52);
|
assert_size!(Item, 44);
|
||||||
assert_size!(Roster, 24);
|
assert_size!(Roster, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ mod tests {
|
||||||
assert_size!(Insert, 20);
|
assert_size!(Insert, 20);
|
||||||
assert_size!(Erase, 12);
|
assert_size!(Erase, 12);
|
||||||
assert_size!(Wait, 4);
|
assert_size!(Wait, 4);
|
||||||
assert_size!(Action, 24);
|
assert_size!(Action, 20);
|
||||||
assert_size!(Rtt, 32);
|
assert_size!(Rtt, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ mod tests {
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(ErrorType, 1);
|
assert_size!(ErrorType, 1);
|
||||||
assert_size!(DefinedCondition, 1);
|
assert_size!(DefinedCondition, 1);
|
||||||
assert_size!(StanzaError, 116);
|
assert_size!(StanzaError, 96);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -45,7 +45,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(StanzaId, 52);
|
assert_size!(StanzaId, 32);
|
||||||
assert_size!(OriginId, 12);
|
assert_size!(OriginId, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Stream, 84);
|
assert_size!(Stream, 68);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -78,7 +78,7 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Open, 84);
|
assert_size!(Open, 68);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -505,7 +505,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(XhtmlIm, 32);
|
assert_size!(XhtmlIm, 32);
|
||||||
assert_size!(Child, 56);
|
assert_size!(Child, 52);
|
||||||
assert_size!(Tag, 52);
|
assert_size!(Tag, 52);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue