### ----------------------------------------------------
### -- ParaSeq
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/44-snip.rakutest
### ----------------------------------------------------
use Test;
use ParaSeq;

plan 4;

my constant $elems   = 200_000;
my constant @list    = (^$elems).List;
my constant $snipper = (* mod 10) xx *;
my constant @snipped = @list.snip($snipper).List;
my constant $batch   = 16;

for 1, ParaSeq.default-degree {
    my $seq := @list.&hyperize($batch, $_).snip($snipper);
    isa-ok $seq, $_ == 1 ?? Seq !! ParaSeq;
    is-deeply $seq.List, @snipped,
      ".snip((* mod 10) xx *) with degree = $_";
}

# vim: expandtab shiftwidth=4


