fn generate(self) -> impl Iterator<Item = Test> {
        let len_start = 2;
        // The iterator below generates *a lot* of tests. The number of
        // tests was chosen somewhat empirically to be "bearable" when
        // running the test suite.
        //
        // We use an iterator here because the collective haystacks of all
        // these test cases add up to enough memory to OOM a conservative
        // sandbox or a small laptop.
        (len_start..=Seed::NEEDLE_LENGTH_LIMIT).flat_map(move |needle_len| {
            let index_start = len_start - 1;
            (index_start..needle_len).flat_map(move |index1| {
                (index1..needle_len).flat_map(move |index2| {
                    (needle_len..=Seed::HAYSTACK_LENGTH_LIMIT).flat_map(
                        move |haystack_len| {
                            Test::new(
                                self,
                                index1,
                                index2,
                                haystack_len,
                                needle_len,
                                None,
                            )
                            .into_iter()
                            .chain(
                                (0..=(haystack_len - needle_len)).flat_map(
                                    move |output| {
                                        Test::new(
                                            self,
                                            index1,
                                            index2,
                                            haystack_len,
                                            needle_len,
                                            Some(output),
                                        )
                                    },
                                ),
                            )
                        },
                    )
                })
            })
        })
    }
Generate a series of prefilter tests from this seed.
src/tests/packedpair.rs