Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
disable test which should be using tap_ok Test::Tap
  • Loading branch information
dwarring committed May 16, 2014
1 parent d6fdc05 commit eeac0ec
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions integration/advent2013-day19.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 10;
plan 4;

#?rakudo.parrot skip 'no implementation of supply'
{
Expand Down Expand Up @@ -45,41 +45,20 @@ plan 10;
#?rakudo.parrot skip 'no implementation of supply'
#?rakudo.moar skip 'Supply.interval on moar'
{
my $n_batches = 0;
my $batches_intact = True;

my $belt_raw = Supply.interval(.1).map({ rand xx 20 });
my $belt_avg = $belt_raw.map(sub (@values) {
$n_batches++;
$batches_intact = False
unless @values == 20;
([+] @values) / @values
});

my $belt_labeled = $belt_avg.map({ Belt => $_ });
my $samples = Supply.interval(.5).map({ rand });
my $samples_labeled = $samples.map({ Sample => $_});
my $merged = $belt_labeled.merge($samples_labeled);

my $all_numeric = True;
my %seen;

$merged.tap({
%seen{.key}{.value}++;
$all_numeric = False
unless .value.isa('Num');
});
sleep 5;
## todo: use Test::Tap tap_ok
## $merged.tap(&say);

$belt_raw.done;
$samples.done;

ok $n_batches, '@values';
ok $batches_intact, '@values';
is_deeply %seen.keys.sort, qw<Belt Sample>, 'merge results';
ok $all_numeric, 'merge results';
ok +%seen<Sample> >= 3, 'multiple samples';
ok +%seen<Belt> >= +%seen<Sample>, 'more belts than samples';
}


0 comments on commit eeac0ec

Please sign in to comment.