mirror of
https://github.com/openharmony/third_party_rust_libc.git
synced 2026-07-21 10:25:23 -04:00
18 lines
295 B
Rust
18 lines
295 B
Rust
//! 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);
|
|
}
|
|
}
|
|
}
|