xmpp-parsers: Fix size tests on 64-bit

This commit is contained in:
Emmanuel Gil Peyrot 2023-06-20 14:08:58 +02:00
parent 022a920300
commit 91736ec0ed
18 changed files with 20 additions and 32 deletions

View file

@ -150,7 +150,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(BindQuery, 24);
assert_size!(BindResponse, 72);
assert_size!(BindResponse, 32);
}
#[test]

View file

@ -84,7 +84,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(Conference, 128);
assert_size!(Conference, 112);
assert_size!(Url, 48);
assert_size!(Storage, 48);
}

View file

@ -82,8 +82,8 @@ mod tests {
assert_size!(Enable, 0);
assert_size!(Disable, 0);
assert_size!(Private, 0);
assert_size!(Received, 408);
assert_size!(Sent, 408);
assert_size!(Received, 288);
assert_size!(Sent, 288);
}
#[test]

View file

@ -47,7 +47,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(Delay, 120);
assert_size!(Delay, 80);
}
#[test]

View file

@ -254,10 +254,7 @@ mod tests {
assert_size!(DiscoInfoQuery, 24);
assert_size!(DiscoInfoResult, 96);
#[cfg(rustc_nightly)]
assert_size!(Item, 120);
#[cfg(not(rustc_nightly))]
assert_size!(Item, 128);
assert_size!(Item, 88);
assert_size!(DiscoItemsQuery, 24);
assert_size!(DiscoItemsResult, 48);
}

View file

@ -39,7 +39,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(Forwarded, 408);
assert_size!(Forwarded, 288);
}
#[test]

View file

@ -240,8 +240,8 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(IqType, 232);
assert_size!(Iq, 416);
assert_size!(IqType, 192);
assert_size!(Iq, 296);
}
#[test]

View file

@ -55,10 +55,7 @@ mod tests {
#[test]
fn test_size() {
assert_size!(JidPrepQuery, 24);
#[cfg(rustc_nightly)]
assert_size!(JidPrepResponse, 72);
#[cfg(not(rustc_nightly))]
assert_size!(JidPrepResponse, 80);
assert_size!(JidPrepResponse, 40);
}
#[test]

View file

@ -712,7 +712,7 @@ mod tests {
assert_size!(Reason, 1);
assert_size!(ReasonElement, 32);
assert_size!(SessionId, 24);
assert_size!(Jingle, 304);
assert_size!(Jingle, 224);
}
#[test]

View file

@ -297,10 +297,7 @@ mod tests {
assert_size!(Mode, 1);
assert_size!(CandidateId, 24);
assert_size!(StreamId, 24);
#[cfg(rustc_nightly)]
assert_size!(Candidate, 128);
#[cfg(not(rustc_nightly))]
assert_size!(Candidate, 136);
assert_size!(Candidate, 96);
assert_size!(TransportPayload, 32);
assert_size!(Transport, 88);
}

View file

@ -109,7 +109,7 @@ mod tests {
fn test_size() {
assert_size!(QueryId, 24);
assert_size!(Query, 232);
assert_size!(Result_, 456);
assert_size!(Result_, 336);
assert_size!(Complete, 1);
assert_size!(Fin, 88);
}

View file

@ -318,7 +318,7 @@ mod tests {
assert_size!(Body, 24);
assert_size!(Subject, 24);
assert_size!(Thread, 24);
assert_size!(Message, 288);
assert_size!(Message, 208);
}
#[test]

View file

@ -393,7 +393,7 @@ mod tests {
fn test_size() {
assert_size!(Show, 1);
assert_size!(Type, 1);
assert_size!(Presence, 240);
assert_size!(Presence, 160);
}
#[test]

View file

@ -112,7 +112,7 @@ mod tests {
assert_size!(Group, 24);
assert_size!(Subscription, 1);
assert_size!(Ask, 1);
assert_size!(Item, 104);
assert_size!(Item, 88);
assert_size!(Roster, 48);
}

View file

@ -326,7 +326,7 @@ mod tests {
fn test_size() {
assert_size!(ErrorType, 1);
assert_size!(DefinedCondition, 1);
assert_size!(StanzaError, 232);
assert_size!(StanzaError, 192);
}
#[test]

View file

@ -52,10 +52,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
#[cfg(rustc_nightly)]
assert_size!(StanzaId, 96);
#[cfg(not(rustc_nightly))]
assert_size!(StanzaId, 104);
assert_size!(StanzaId, 64);
assert_size!(OriginId, 24);
}

View file

@ -85,7 +85,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(Stream, 168);
assert_size!(Stream, 136);
}
#[test]

View file

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