1 #[test] test_error()2fn test_error() { 3 assert_eq!( 4 rustix::io::Errno::INVAL, 5 rustix::io::Errno::from_raw_os_error(rustix::io::Errno::INVAL.raw_os_error()) 6 ); 7 #[cfg(not(windows))] 8 assert_eq!(rustix::io::Errno::INVAL.raw_os_error(), libc::EINVAL); 9 #[cfg(windows)] 10 assert_eq!( 11 rustix::io::Errno::INVAL.raw_os_error(), 12 windows_sys::Win32::Networking::WinSock::WSAEINVAL 13 ); 14 } 15