summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/errno.rs320
1 files changed, 0 insertions, 320 deletions
diff --git a/src/errno.rs b/src/errno.rs
index c3f33cb3..67171795 100644
--- a/src/errno.rs
+++ b/src/errno.rs
@@ -1906,323 +1906,3 @@ mod consts {
}
}
}
-
-
-#[cfg(test)]
-mod test {
- use super::Errno::*;
- use nixtest::assert_const_eq;
- use libc::c_int;
-
- macro_rules! check_errno {
- ($($errno:ident),+) => {{
- $(assert_const_eq(stringify!($errno), $errno as c_int);)+
- }};
- }
-
- #[test]
- pub fn test_errno_values() {
- check_errno!(
- EPERM,
- ENOENT,
- ESRCH,
- EINTR,
- EIO,
- ENXIO,
- E2BIG,
- ENOEXEC,
- EBADF,
- ECHILD,
- EAGAIN,
- ENOMEM,
- EACCES,
- EFAULT,
- ENOTBLK,
- EBUSY,
- EEXIST,
- EXDEV,
- ENODEV,
- ENOTDIR,
- EISDIR,
- EINVAL,
- ENFILE,
- EMFILE,
- ENOTTY,
- ETXTBSY,
- EFBIG,
- ENOSPC,
- ESPIPE,
- EROFS,
- EMLINK,
- EPIPE,
- EDOM,
- ERANGE,
- EDEADLK,
- ENAMETOOLONG,
- ENOLCK,
- ENOSYS,
- ENOTEMPTY,
- ELOOP,
- ENOMSG,
- EIDRM);
-
- check_errno!(
- EINPROGRESS,
- EALREADY,
- ENOTSOCK,
- EDESTADDRREQ,
- EMSGSIZE,
- EPROTOTYPE,
- ENOPROTOOPT,
- EPROTONOSUPPORT,
- ESOCKTNOSUPPORT,
- EPFNOSUPPORT,
- EAFNOSUPPORT,
- EADDRINUSE,
- EADDRNOTAVAIL,
- ENETDOWN,
- ENETUNREACH,
- ENETRESET,
- ECONNABORTED,
- ECONNRESET,
- ENOBUFS,
- EISCONN,
- ENOTCONN,
- ESHUTDOWN,
- ETOOMANYREFS,
- ETIMEDOUT,
- ECONNREFUSED,
- EHOSTDOWN,
- EHOSTUNREACH);
- }
-
- #[test]
- #[cfg(any(target_os = "linux", target_os = "android"))]
- pub fn test_linux_errnos() {
- check_errno!(
- ECHRNG,
- EL2NSYNC,
- EL3HLT,
- EL3RST,
- ELNRNG,
- EUNATCH,
- ENOCSI,
- EL2HLT,
- EBADE,
- EBADR,
- EXFULL,
- ENOANO,
- EBADRQC,
- EBADSLT,
- EBFONT,
- ENOSTR,
- ENODATA,
- ETIME,
- ENOSR,
- ENONET,
- ENOPKG,
- EREMOTE,
- ENOLINK,
- EADV,
- ESRMNT,
- ECOMM,
- EPROTO,
- EMULTIHOP,
- EDOTDOT,
- EBADMSG,
- EOVERFLOW,
- ENOTUNIQ,
- EBADFD,
- EREMCHG,
- ELIBACC,
- ELIBBAD,
- ELIBSCN,
- ELIBMAX,
- ELIBEXEC,
- EILSEQ,
- ERESTART,
- ESTRPIPE,
- EUSERS,
- EOPNOTSUPP,
- ESTALE,
- EUCLEAN,
- ENOTNAM,
- ENAVAIL,
- EISNAM,
- EREMOTEIO,
- EDQUOT,
- ENOMEDIUM,
- EMEDIUMTYPE,
- ECANCELED,
- ENOKEY,
- EKEYEXPIRED,
- EKEYREVOKED,
- EKEYREJECTED,
- EOWNERDEAD,
- ENOTRECOVERABLE);
- }
-
- #[test]
- #[cfg(all(target_os = "linux", not(target_arch = "mips")))]
- pub fn test_linux_not_android_errnos() {
- check_errno!(
- ERFKILL /*,
- EHWPOISON */);
- }
-
- #[test]
- #[cfg(target_os = "freebsd")]
- pub fn test_freebsd_errnos() {
- check_errno!(
- EDOOFUS,
- EMULTIHOP,
- ENOLINK,
- ENOTCAPABLE,
- ECAPMODE,
- ENEEDAUTH,
- EOVERFLOW,
- EILSEQ,
- ENOATTR,
- EBADMSG,
- EPROTO,
- ENOTRECOVERABLE,
- EOWNERDEAD,
- ENOTSUP,
- EPROCLIM,
- EUSERS,
- EDQUOT,
- ESTALE,
- EREMOTE,
- EBADRPC,
- ERPCMISMATCH,
- EPROGUNAVAIL,
- EPROGMISMATCH,
- EPROCUNAVAIL,
- EAUTH);
- }
-
- #[test]
- #[cfg(target_os = "dragonfly")]
- pub fn test_dragonfly_errnos() {
- check_errno!(
- EDOOFUS,
- EMULTIHOP,
- ENOLINK,
- ENEEDAUTH,
- EOVERFLOW,
- EILSEQ,
- ENOATTR,
- EBADMSG,
- EPROTO,
- ENOTSUP,
- EPROCLIM,
- EUSERS,
- EDQUOT,
- ESTALE,
- EREMOTE,
- EBADRPC,
- ERPCMISMATCH,
- EPROGUNAVAIL,
- EPROGMISMATCH,
- EPROCUNAVAIL,
- EAUTH);
- }
-
- #[test]
- #[cfg(target_os = "openbsd")]
- pub fn test_openbsd_errnos() {
- check_errno!(
- EADDRINUSE,
- EADDRNOTAVAIL,
- EAFNOSUPPORT,
- EALREADY,
- EAUTH,
- EBADRPC,
- ECANCELED,
- ECONNABORTED,
- ECONNREFUSED,
- ECONNRESET,
- EDESTADDRREQ,
- EDQUOT,
- EFTYPE,
- EHOSTDOWN,
- EHOSTUNREACH,
- EILSEQ,
- EINPROGRESS,
- EIPSEC,
- EISCONN,
- EMEDIUMTYPE,
- EMSGSIZE,
- ENEEDAUTH,
- ENETDOWN,
- ENETRESET,
- ENETUNREACH,
- ENOATTR,
- ENOBUFS,
- ENOMEDIUM,
- ENOPROTOOPT,
- ENOTCONN,
- ENOTSOCK,
- ENOTSUP,
- EOPNOTSUPP,
- EOVERFLOW,
- EPFNOSUPPORT,
- EPROCLIM,
- EPROCUNAVAIL,
- EPROGMISMATCH,
- EPROGUNAVAIL,
- EPROTONOSUPPORT,
- EPROTOTYPE,
- EREMOTE,
- ESHUTDOWN,
- ESOCKTNOSUPPORT,
- ESTALE,
- ETIMEDOUT,
- ETOOMANYREFS,
- EUSERS);
- }
-
- #[test]
- #[cfg(any(target_os = "macos", target_os = "ios"))]
- pub fn test_darwin_errnos() {
- check_errno!(
- ENOTSUP,
- EPROCLIM,
- EUSERS,
- EDQUOT,
- ESTALE,
- EREMOTE,
- EBADRPC,
- ERPCMISMATCH,
- EPROGUNAVAIL,
- EPROGMISMATCH,
- EPROCUNAVAIL,
- EFTYPE,
- EAUTH,
- ENEEDAUTH,
- EPWROFF,
- EDEVERR,
- EOVERFLOW,
- EBADEXEC,
- EBADARCH,
- ESHLIBVERS,
- EBADMACHO,
- ECANCELED,
- EILSEQ,
- ENOATTR,
- EBADMSG,
- EMULTIHOP,
- ENODATA,
- ENOLINK,
- ENOSR,
- ENOSTR,
- EPROTO,
- ETIME,
- EOPNOTSUPP,
- ENOPOLICY,
- ENOTRECOVERABLE,
- EOWNERDEAD,
- EQFULL
- );
- }
-}