bob, jid_prep, cert_management: Add size tests for 32-bit.
This commit is contained in:
parent
8b54b7fd43
commit
eac385700c
3 changed files with 33 additions and 2 deletions
|
@ -95,8 +95,8 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(ContentId, 24);
|
assert_size!(ContentId, 28);
|
||||||
assert_size!(Data, 24);
|
assert_size!(Data, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
|
|
@ -118,9 +118,32 @@ mod tests {
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(Append, 28);
|
||||||
|
assert_size!(Disable, 12);
|
||||||
|
assert_size!(Revoke, 12);
|
||||||
|
assert_size!(ListCertsQuery, 0);
|
||||||
|
assert_size!(ListCertsResponse, 12);
|
||||||
|
assert_size!(Item, 40);
|
||||||
|
assert_size!(Resource, 12);
|
||||||
|
assert_size!(Users, 12);
|
||||||
|
assert_size!(Cert, 12);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "64")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Append, 56);
|
assert_size!(Append, 56);
|
||||||
|
assert_size!(Disable, 24);
|
||||||
|
assert_size!(Revoke, 24);
|
||||||
|
assert_size!(ListCertsQuery, 0);
|
||||||
|
assert_size!(ListCertsResponse, 24);
|
||||||
|
assert_size!(Item, 80);
|
||||||
|
assert_size!(Resource, 24);
|
||||||
|
assert_size!(Users, 24);
|
||||||
|
assert_size!(Cert, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -46,6 +46,14 @@ mod tests {
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(JidPrepQuery, 12);
|
||||||
|
assert_size!(JidPrepResponse, 40);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "64")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(JidPrepQuery, 24);
|
assert_size!(JidPrepQuery, 24);
|
||||||
|
|
Loading…
Reference in a new issue