#![cfg_attr(target_os = "wasi", feature(wasi_ext))] #[cfg(any(not(windows), feature = "close"))] use std::mem::size_of; #[cfg(unix)] #[test] fn test_assumptions() { assert_eq!(size_of::(), size_of::()); assert_eq!( size_of::(), size_of::() ); } #[cfg(target_os = "wasi")] #[test] fn test_assumptions() { assert_eq!(size_of::(), size_of::()); assert_eq!( size_of::(), size_of::() ); } #[cfg(all(windows, feature = "close"))] #[test] fn test_assumptions() { assert_eq!( size_of::(), size_of::() ); assert_eq!( size_of::(), size_of::() ); assert_eq!( windows_sys::Win32::Networking::WinSock::INVALID_SOCKET, usize::MAX ); assert_ne!( windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE, std::ptr::null_mut() as std::os::windows::io::RawHandle as _ ); }