Skip to content

Commit

Permalink
Fix test_type_types on 32-bit targets
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Aug 30, 2023
1 parent b6a5244 commit 80946ed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/format/strftime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,20 @@ mod tests {
}

#[test]
#[cfg(feature = "unstable-locales")]
#[cfg(all(feature = "unstable-locales", target_pointer_width = "64"))]
fn test_type_sizes() {
use core::mem::size_of;
assert_eq!(size_of::<Item>(), 24);
assert_eq!(size_of::<StrftimeItems>(), 56);
assert_eq!(size_of::<Locale>(), 2);
}

#[test]
#[cfg(all(feature = "unstable-locales", target_pointer_width = "32"))]
fn test_type_sizes() {
use core::mem::size_of;
assert_eq!(size_of::<Item>(), 12);
assert_eq!(size_of::<StrftimeItems>(), 28);
assert_eq!(size_of::<Locale>(), 2);
}
}

0 comments on commit 80946ed

Please sign in to comment.