Fix size tests on latest Rust release
Since Rust 1.76, and some much older nightly, there have been improvements to the niche computation, which leads to smaller types which can encode the same amount of data, variants, and such. This fixes the tests on this compiler version.
This commit is contained in:
parent
1ecfaeb2bf
commit
6df8062867
9 changed files with 23 additions and 23 deletions
|
@ -66,7 +66,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Metadata, 12);
|
||||
assert_size!(Info, 64);
|
||||
assert_size!(Info, 60);
|
||||
assert_size!(Data, 12);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Metadata, 24);
|
||||
assert_size!(Info, 120);
|
||||
assert_size!(Info, 112);
|
||||
assert_size!(Data, 24);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,15 +93,15 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(ContentId, 28);
|
||||
assert_size!(Data, 60);
|
||||
assert_size!(ContentId, 24);
|
||||
assert_size!(Data, 56);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(ContentId, 56);
|
||||
assert_size!(Data, 120);
|
||||
assert_size!(ContentId, 48);
|
||||
assert_size!(Data, 112);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -222,13 +222,13 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Caps, 52);
|
||||
assert_size!(Caps, 48);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Caps, 104);
|
||||
assert_size!(Caps, 96);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -209,15 +209,15 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Algo, 16);
|
||||
assert_size!(Hash, 28);
|
||||
assert_size!(Algo, 12);
|
||||
assert_size!(Hash, 24);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Algo, 32);
|
||||
assert_size!(Hash, 56);
|
||||
assert_size!(Algo, 24);
|
||||
assert_size!(Hash, 48);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -688,7 +688,7 @@ mod tests {
|
|||
assert_size!(Senders, 1);
|
||||
assert_size!(Disposition, 1);
|
||||
assert_size!(ContentId, 12);
|
||||
assert_size!(Content, 220);
|
||||
assert_size!(Content, 216);
|
||||
assert_size!(Reason, 1);
|
||||
assert_size!(ReasonElement, 16);
|
||||
assert_size!(SessionId, 12);
|
||||
|
|
|
@ -78,14 +78,14 @@ mod tests {
|
|||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Setup, 1);
|
||||
assert_size!(Fingerprint, 32);
|
||||
assert_size!(Fingerprint, 28);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Setup, 1);
|
||||
assert_size!(Fingerprint, 64);
|
||||
assert_size!(Fingerprint, 56);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -118,7 +118,7 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Transport, 68);
|
||||
assert_size!(Transport, 64);
|
||||
assert_size!(Type, 1);
|
||||
assert_size!(Candidate, 88);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(Transport, 136);
|
||||
assert_size!(Transport, 128);
|
||||
assert_size!(Type, 1);
|
||||
assert_size!(Candidate, 128);
|
||||
}
|
||||
|
|
|
@ -109,13 +109,13 @@ mod tests {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(JingleMI, 76);
|
||||
assert_size!(JingleMI, 72);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(JingleMI, 152);
|
||||
assert_size!(JingleMI, 144);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -504,16 +504,16 @@ mod tests {
|
|||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(XhtmlIm, 32);
|
||||
assert_size!(Child, 52);
|
||||
assert_size!(Tag, 52);
|
||||
assert_size!(Child, 48);
|
||||
assert_size!(Tag, 48);
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[test]
|
||||
fn test_size() {
|
||||
assert_size!(XhtmlIm, 48);
|
||||
assert_size!(Child, 104);
|
||||
assert_size!(Tag, 104);
|
||||
assert_size!(Child, 96);
|
||||
assert_size!(Tag, 96);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue