From 80946ed4e71136b11e559624c8cf81ead86f994a Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Wed, 30 Aug 2023 19:35:06 +0200 Subject: [PATCH] Fix `test_type_types` on 32-bit targets --- src/format/strftime.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/format/strftime.rs b/src/format/strftime.rs index 50d4ac7cc3..d7551457f7 100644 --- a/src/format/strftime.rs +++ b/src/format/strftime.rs @@ -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::(), 24); assert_eq!(size_of::(), 56); assert_eq!(size_of::(), 2); } + + #[test] + #[cfg(all(feature = "unstable-locales", target_pointer_width = "32"))] + fn test_type_sizes() { + use core::mem::size_of; + assert_eq!(size_of::(), 12); + assert_eq!(size_of::(), 28); + assert_eq!(size_of::(), 2); + } }