MCPcopy Create free account
hub / github.com/rust-lang/libc / test_kernel_version

Function test_kernel_version

libc-test/tests/linux_kernel_version.rs:8–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7 #[test]
8 fn test_kernel_version() {
9 assert_eq!(libc::KERNEL_VERSION(6, 0, 0), 393216);
10 // Check that the patch level saturates
11 assert_eq!(libc::KERNEL_VERSION(6, 0, 255), 393471);
12 assert_eq!(libc::KERNEL_VERSION(6, 0, 256), 393471);
13 assert_eq!(libc::KERNEL_VERSION(6, 0, 300), 393471);
14 assert_eq!(libc::KERNEL_VERSION(6, 0, u32::MAX), 393471);
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…