diff options
Diffstat (limited to 'libc-test/test/linux_kernel_version.rs')
-rw-r--r-- | libc-test/test/linux_kernel_version.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libc-test/test/linux_kernel_version.rs b/libc-test/test/linux_kernel_version.rs new file mode 100644 index 0000000000..c5687edad5 --- /dev/null +++ b/libc-test/test/linux_kernel_version.rs @@ -0,0 +1,17 @@ +//! Compare libc's KERNEL_VERSION macro against a specific kernel version. + +extern crate libc; + +#[cfg( + target_os = "linux", +)] +mod t { + use libc; + + #[test] + fn test_kernel_version() { + unsafe { + assert_eq!(libc::KERNEL_VERSION(6, 0, 0), 393216); + } + } +} |