• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //! Compare libc's SIGRTMAX and SIGRTMIN functions against the actual C macros
2 
3 extern crate libc;
4 
5 #[cfg(any(
6     target_os = "linux",
7     target_os = "l4re",
8     target_os = "android",
9     target_os = "emscripten"
10 ))]
11 mod t {
12     use libc;
13 
14     extern "C" {
sigrtmax() -> libc::c_int15         pub fn sigrtmax() -> libc::c_int;
sigrtmin() -> libc::c_int16         pub fn sigrtmin() -> libc::c_int;
17     }
18 
19     #[test]
test_sigrtmax()20     fn test_sigrtmax() {
21         unsafe {
22             assert_eq!(libc::SIGRTMAX(), sigrtmax());
23         }
24     }
25 
26     #[test]
test_sigrtmin()27     fn test_sigrtmin() {
28         unsafe {
29             assert_eq!(libc::SIGRTMIN(), sigrtmin());
30         }
31     }
32 }
33