debian/missing-sources/safe_arch/tests/integration/popcnt_tests.rs
raw| 1 | use super::*; |
| 2 | |
| 3 | #[test] |
| 4 | fn test_population_count_i32() { |
| 5 | assert_eq!(population_count_i32(0), 0); |
| 6 | assert_eq!(population_count_i32(0b1), 1); |
| 7 | assert_eq!(population_count_i32(0b1001), 2); |
| 8 | } |
| 9 | |
| 10 | #[test] |
| 11 | #[cfg(target_arch = "x86_64")] |
| 12 | fn test_population_count_i64() { |
| 13 | assert_eq!(population_count_i64(0), 0); |
| 14 | assert_eq!(population_count_i64(0b1), 1); |
| 15 | assert_eq!(population_count_i64(0b1001), 2); |
| 16 | } |