xmpp-parsers: Fix size tests on 32-bit

This commit is contained in:
Emmanuel Gil Peyrot 2023-06-20 14:14:15 +02:00
parent e4b8a75cdd
commit 5582d089bd
22 changed files with 25 additions and 25 deletions

View file

@ -143,7 +143,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(BindQuery, 12);
assert_size!(BindResponse, 36);
assert_size!(BindResponse, 16);
}
#[cfg(target_pointer_width = "64")]

View file

@ -76,7 +76,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Conference, 64);
assert_size!(Conference, 56);
assert_size!(Url, 24);
assert_size!(Storage, 24);
}

View file

@ -72,8 +72,8 @@ mod tests {
assert_size!(Enable, 0);
assert_size!(Disable, 0);
assert_size!(Private, 0);
assert_size!(Received, 212);
assert_size!(Sent, 212);
assert_size!(Received, 152);
assert_size!(Sent, 152);
}
#[cfg(target_pointer_width = "64")]

View file

@ -41,7 +41,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Delay, 68);
assert_size!(Delay, 48);
}
#[cfg(target_pointer_width = "64")]

View file

@ -241,7 +241,7 @@ mod tests {
assert_size!(DiscoInfoQuery, 12);
assert_size!(DiscoInfoResult, 48);
assert_size!(Item, 64);
assert_size!(Item, 44);
assert_size!(DiscoItemsQuery, 12);
assert_size!(DiscoItemsResult, 24);
}

View file

@ -33,7 +33,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Forwarded, 212);
assert_size!(Forwarded, 152);
}
#[cfg(target_pointer_width = "64")]

View file

@ -233,8 +233,8 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(IqType, 120);
assert_size!(Iq, 212);
assert_size!(IqType, 96);
assert_size!(Iq, 148);
}
#[cfg(target_pointer_width = "64")]

View file

@ -48,7 +48,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(JidPrepQuery, 12);
assert_size!(JidPrepResponse, 40);
assert_size!(JidPrepResponse, 20);
}
#[cfg(target_pointer_width = "64")]

View file

@ -689,11 +689,11 @@ mod tests {
assert_size!(Senders, 1);
assert_size!(Disposition, 1);
assert_size!(ContentId, 12);
assert_size!(Content, 228);
assert_size!(Content, 220);
assert_size!(Reason, 1);
assert_size!(ReasonElement, 16);
assert_size!(SessionId, 12);
assert_size!(Jingle, 152);
assert_size!(Jingle, 112);
}
#[cfg(target_pointer_width = "64")]

View file

@ -121,7 +121,7 @@ mod tests {
fn test_size() {
assert_size!(Transport, 68);
assert_size!(Type, 1);
assert_size!(Candidate, 92);
assert_size!(Candidate, 88);
}
#[cfg(target_pointer_width = "64")]

View file

@ -66,7 +66,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(Transport, 12);
assert_size!(Candidate, 40);
assert_size!(Candidate, 36);
}
#[cfg(target_pointer_width = "64")]

View file

@ -285,7 +285,7 @@ mod tests {
assert_size!(Mode, 1);
assert_size!(CandidateId, 12);
assert_size!(StreamId, 12);
assert_size!(Candidate, 84);
assert_size!(Candidate, 60);
assert_size!(TransportPayload, 16);
assert_size!(Transport, 44);
}

View file

@ -99,7 +99,7 @@ mod tests {
fn test_size() {
assert_size!(QueryId, 12);
assert_size!(Query, 116);
assert_size!(Result_, 236);
assert_size!(Result_, 176);
assert_size!(Complete, 1);
assert_size!(Fin, 44);
}

View file

@ -308,7 +308,7 @@ mod tests {
assert_size!(Body, 12);
assert_size!(Subject, 12);
assert_size!(Thread, 12);
assert_size!(Message, 144);
assert_size!(Message, 104);
}
#[cfg(target_pointer_width = "64")]

View file

@ -385,7 +385,7 @@ mod tests {
fn test_size() {
assert_size!(Show, 1);
assert_size!(Type, 1);
assert_size!(Presence, 120);
assert_size!(Presence, 80);
}
#[cfg(target_pointer_width = "64")]

View file

@ -102,7 +102,7 @@ mod tests {
assert_size!(Group, 12);
assert_size!(Subscription, 1);
assert_size!(Ask, 1);
assert_size!(Item, 52);
assert_size!(Item, 44);
assert_size!(Roster, 24);
}

View file

@ -254,7 +254,7 @@ mod tests {
assert_size!(Insert, 20);
assert_size!(Erase, 12);
assert_size!(Wait, 4);
assert_size!(Action, 24);
assert_size!(Action, 20);
assert_size!(Rtt, 32);
}

View file

@ -318,7 +318,7 @@ mod tests {
fn test_size() {
assert_size!(ErrorType, 1);
assert_size!(DefinedCondition, 1);
assert_size!(StanzaError, 116);
assert_size!(StanzaError, 96);
}
#[cfg(target_pointer_width = "64")]

View file

@ -45,7 +45,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(StanzaId, 52);
assert_size!(StanzaId, 32);
assert_size!(OriginId, 12);
}

View file

@ -79,7 +79,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Stream, 84);
assert_size!(Stream, 68);
}
#[cfg(target_pointer_width = "64")]

View file

@ -78,7 +78,7 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Open, 84);
assert_size!(Open, 68);
}
#[cfg(target_pointer_width = "64")]

View file

@ -505,7 +505,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(XhtmlIm, 32);
assert_size!(Child, 56);
assert_size!(Child, 52);
assert_size!(Tag, 52);
}