()
| 13 | // Test the basic functionality of the hamming_distance function |
| 14 | #[test] |
| 15 | fn test_hamming_distance() { |
| 16 | let a: [u8; QUANTIZED_VECTOR_SIZE] = [0xFF; QUANTIZED_VECTOR_SIZE]; // All bits set |
| 17 | let b: [u8; QUANTIZED_VECTOR_SIZE] = [0x00; QUANTIZED_VECTOR_SIZE]; // All bits unset |
| 18 | assert_eq!(hamming_distance(&a, &b), QUANTIZED_VECTOR_SIZE as u16 * 8); |
| 19 | } |
| 20 | |
| 21 | // Test the zero case for hamming_distance |
| 22 | #[test] |
nothing calls this directly
no outgoing calls
no test coverage detected