1 #![feature(const_int_sign)]
3 const NEGATIVE_A: bool = (-10i32).is_negative();
4 const NEGATIVE_B: bool = 10i32.is_negative();
5 const POSITIVE_A: bool = (-10i32).is_positive();
6 const POSITIVE_B: bool = 10i32.is_positive();
8 const SIGNUM_POS: i32 = 10i32.signum();
9 const SIGNUM_NIL: i32 = 0i32.signum();
10 const SIGNUM_NEG: i32 = (-42i32).signum();
18 assert_eq!(SIGNUM_POS, 1);
19 assert_eq!(SIGNUM_NIL, 0);
20 assert_eq!(SIGNUM_NEG, -1);