fn expand(&self) -> Vec<MemchrTest> {
        let mut more = Vec::new();

        // Add bytes to the start of the corpus.
        for i in 1..515 {
            let mut t = self.clone();
            let mut new_corpus: String = repeat('%').take(i).collect();
            new_corpus.push_str(&t.corpus);
            t.corpus = new_corpus;
            t.positions = t.positions.into_iter().map(|p| p + i).collect();
            more.push(t);
        }
        // Add bytes to the end of the corpus.
        for i in 1..515 {
            let mut t = self.clone();
            let padding: String = repeat('%').take(i).collect();
            t.corpus.push_str(&padding);
            more.push(t);
        }

        more
    }
/// Expand this test into many variations of the same test.
///
/// In particular, this will generate more tests with larger corpus sizes.
/// The expected positions are updated to maintain the integrity of the
/// test.
///
/// This is important in testing a memchr implementation, because there are
/// often different cases depending on the length of the corpus.
///
/// Note that we extend the corpus by adding `%` bytes, which we
/// don't otherwise use as a needle.
Expand this test into many variations of the same test.
In particular, this will generate more tests with larger corpus sizes.
The expected positions are updated to maintain the integrity of the
test.

This is important in testing a memchr implementation, because there are
often different cases depending on the length of the corpus.

Note that we extend the corpus by adding `%` bytes, which we
don't otherwise use as a needle.
Expand this test into many variations of the same test . In particular this will generate more tests with larger corpus sizes . The expected positions are updated to maintain the integrity of the test . This is important in testing a memchr implementation because there are often different cases depending on the length of the corpus . Note that we extend the corpus by adding ` % ` bytes which we don ' t otherwise use as a needle .
fn expand(&self) -> Vec<MemchrTest> {
        let mut more = Vec::new();
        // Add bytes to the start of the corpus.
        for i in 1..515 {
            let mut t = self.clone();
            let mut new_corpus: String = repeat('%').take(i).collect();
            new_corpus.push_str(&t.corpus);
            t.corpus = new_corpus;
            t.positions = t.positions.into_iter().map(|p| p + i).collect();
            more.push(t);
        }
        // Add bytes to the end of the corpus.
        for i in 1..515 {
            let mut t = self.clone();
            let padding: String = repeat('%').take(i).collect();
            t.corpus.push_str(&padding);
            more.push(t);
        }
        more
    }
fn expand ( & self ) -> Vec < MemchrTest > { let mut more = Vec :: new ( ) ; // Add bytes to the start of the corpus. for i in 1 .. 515 { let mut t = self . clone ( ) ; let mut new_corpus : String = repeat ( '%' ) . take ( i ) . collect ( ) ; new_corpus . push_str ( & t . corpus ) ; t . corpus = new_corpus ; t . positions = t . positions . into_iter ( ) . map ( | p | p + i ) . collect ( ) ; more . push ( t ) ; } // Add bytes to the end of the corpus. for i in 1 .. 515 { let mut t = self . clone ( ) ; let padding : String = repeat ( '%' ) . take ( i ) . collect ( ) ; t . corpus . push_str ( & padding ) ; more . push ( t ) ; } more }
Expand this test into many variations of the same test.
Expand this test into many variations of the same test .
&self
&self