pub(crate) fn count_iter<F>(self, mut test: F)
    where
        F: FnMut(&[u8], &[u8]) -> Option<usize> + 'static,
    {
        for seed in SEEDS.iter() {
            if seed.needles.len() > self.needle_len {
                continue;
            }
            for t in seed.generate() {
                let got = match test(t.haystack.as_bytes(), &t.needles) {
                    None => continue,
                    Some(got) => got,
                };
                assert_eq!(
                    t.expected.len(),
                    got,
                    "needles: {:?}, haystack: {:?}",
                    t.needles
                        .iter()
                        .map(|&b| b.to_char())
                        .collect::<Vec<char>>(),
                    t.haystack,
                );
            }
        }
    }
Run all tests as counting tests. This panics on the first failure.

That is, this only checks that the number of matches is correct and
not whether the offsets of each match are.
src/tests/memchr/mod.rs