From 5582d089bd1471f2297496692e1ac254e87e8707 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 20 Jun 2023 14:14:15 +0200 Subject: [PATCH] xmpp-parsers: Fix size tests on 32-bit --- parsers/src/bind.rs | 2 +- parsers/src/bookmarks.rs | 2 +- parsers/src/carbons.rs | 4 ++-- parsers/src/delay.rs | 2 +- parsers/src/disco.rs | 2 +- parsers/src/forwarding.rs | 2 +- parsers/src/iq.rs | 4 ++-- parsers/src/jid_prep.rs | 2 +- parsers/src/jingle.rs | 4 ++-- parsers/src/jingle_ice_udp.rs | 2 +- parsers/src/jingle_raw_udp.rs | 2 +- parsers/src/jingle_s5b.rs | 2 +- parsers/src/mam.rs | 2 +- parsers/src/message.rs | 2 +- parsers/src/presence.rs | 2 +- parsers/src/roster.rs | 2 +- parsers/src/rtt.rs | 2 +- parsers/src/stanza_error.rs | 2 +- parsers/src/stanza_id.rs | 2 +- parsers/src/stream.rs | 2 +- parsers/src/websocket.rs | 2 +- parsers/src/xhtml.rs | 2 +- 22 files changed, 25 insertions(+), 25 deletions(-) diff --git a/parsers/src/bind.rs b/parsers/src/bind.rs index 982cbca..dc75307 100644 --- a/parsers/src/bind.rs +++ b/parsers/src/bind.rs @@ -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")] diff --git a/parsers/src/bookmarks.rs b/parsers/src/bookmarks.rs index cbaea94..9ed2433 100644 --- a/parsers/src/bookmarks.rs +++ b/parsers/src/bookmarks.rs @@ -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); } diff --git a/parsers/src/carbons.rs b/parsers/src/carbons.rs index 47b08da..010830f 100644 --- a/parsers/src/carbons.rs +++ b/parsers/src/carbons.rs @@ -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")] diff --git a/parsers/src/delay.rs b/parsers/src/delay.rs index a0c5225..dcaad9f 100644 --- a/parsers/src/delay.rs +++ b/parsers/src/delay.rs @@ -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")] diff --git a/parsers/src/disco.rs b/parsers/src/disco.rs index 5e4e071..db162cf 100644 --- a/parsers/src/disco.rs +++ b/parsers/src/disco.rs @@ -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); } diff --git a/parsers/src/forwarding.rs b/parsers/src/forwarding.rs index 4590058..75008ea 100644 --- a/parsers/src/forwarding.rs +++ b/parsers/src/forwarding.rs @@ -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")] diff --git a/parsers/src/iq.rs b/parsers/src/iq.rs index 5239b39..b725a8f 100644 --- a/parsers/src/iq.rs +++ b/parsers/src/iq.rs @@ -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")] diff --git a/parsers/src/jid_prep.rs b/parsers/src/jid_prep.rs index 69c767e..7468363 100644 --- a/parsers/src/jid_prep.rs +++ b/parsers/src/jid_prep.rs @@ -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")] diff --git a/parsers/src/jingle.rs b/parsers/src/jingle.rs index 0784f3c..e97cd66 100644 --- a/parsers/src/jingle.rs +++ b/parsers/src/jingle.rs @@ -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")] diff --git a/parsers/src/jingle_ice_udp.rs b/parsers/src/jingle_ice_udp.rs index fdda570..a9907ad 100644 --- a/parsers/src/jingle_ice_udp.rs +++ b/parsers/src/jingle_ice_udp.rs @@ -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")] diff --git a/parsers/src/jingle_raw_udp.rs b/parsers/src/jingle_raw_udp.rs index b2624bf..bf3c4b1 100644 --- a/parsers/src/jingle_raw_udp.rs +++ b/parsers/src/jingle_raw_udp.rs @@ -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")] diff --git a/parsers/src/jingle_s5b.rs b/parsers/src/jingle_s5b.rs index 1e1a8e4..2a5ba02 100644 --- a/parsers/src/jingle_s5b.rs +++ b/parsers/src/jingle_s5b.rs @@ -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); } diff --git a/parsers/src/mam.rs b/parsers/src/mam.rs index a8a0551..42c541c 100644 --- a/parsers/src/mam.rs +++ b/parsers/src/mam.rs @@ -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); } diff --git a/parsers/src/message.rs b/parsers/src/message.rs index 1c86094..45b58f9 100644 --- a/parsers/src/message.rs +++ b/parsers/src/message.rs @@ -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")] diff --git a/parsers/src/presence.rs b/parsers/src/presence.rs index 5bc3cc7..dc7aa33 100644 --- a/parsers/src/presence.rs +++ b/parsers/src/presence.rs @@ -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")] diff --git a/parsers/src/roster.rs b/parsers/src/roster.rs index 445a8bf..5062bb1 100644 --- a/parsers/src/roster.rs +++ b/parsers/src/roster.rs @@ -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); } diff --git a/parsers/src/rtt.rs b/parsers/src/rtt.rs index 6eb24ea..89a288b 100644 --- a/parsers/src/rtt.rs +++ b/parsers/src/rtt.rs @@ -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); } diff --git a/parsers/src/stanza_error.rs b/parsers/src/stanza_error.rs index 03dd103..c6ae569 100644 --- a/parsers/src/stanza_error.rs +++ b/parsers/src/stanza_error.rs @@ -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")] diff --git a/parsers/src/stanza_id.rs b/parsers/src/stanza_id.rs index fadd5e8..bc72e12 100644 --- a/parsers/src/stanza_id.rs +++ b/parsers/src/stanza_id.rs @@ -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); } diff --git a/parsers/src/stream.rs b/parsers/src/stream.rs index 21dcab5..98a99c6 100644 --- a/parsers/src/stream.rs +++ b/parsers/src/stream.rs @@ -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")] diff --git a/parsers/src/websocket.rs b/parsers/src/websocket.rs index ecd065d..001fe8a 100644 --- a/parsers/src/websocket.rs +++ b/parsers/src/websocket.rs @@ -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")] diff --git a/parsers/src/xhtml.rs b/parsers/src/xhtml.rs index 39e47a6..6d30255 100644 --- a/parsers/src/xhtml.rs +++ b/parsers/src/xhtml.rs @@ -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); }