Skip to content

Commit 01feaf8

Browse files
committed
Some test adaptations because of Baggy streamline
1 parent 3c20f45 commit 01feaf8

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

S02-types/bag.t

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 198;
4+
plan 196;
55

66
sub showkv($x) {
77
$x.keys.sort.map({ $^k ~ ':' ~ $x{$k} }).join(' ')
@@ -348,10 +348,8 @@ sub showkv($x) {
348348
my $b = Bag.new("a", "b", "b");
349349

350350
my $a = $b.pickpairs;
351-
isa_ok $a, List, 'Did we get a List';
352-
is $a.elems, 1, 'Did we get one element';
353-
isa_ok $a[0], Pair, 'Did we get a Pair in the List';
354-
ok ($a[0] eq "a\t1" or $a[0] eq "b\t2"), "We got one of the two choices";
351+
isa_ok $a, Pair, 'Did we get a Pair';
352+
ok ($a eq "a\t1" or $a eq "b\t2"), "We got one of the two choices";
355353

356354
my @a = $b.pickpairs(2);
357355
is +@a, 2, '.pickpairs(2) returns the right number of items';

S02-types/baghash.t

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 252;
4+
plan 250;
55

66
# L<S02/Mutable types/QuantHash of UInt>
77

@@ -336,10 +336,8 @@ sub showkv($x) {
336336

337337
my $a = $b.pickpairs;
338338
say :$a.perl;
339-
isa_ok $a, List, 'Did we get a List';
340-
is $a.elems, 1, 'Did we get one element';
341-
isa_ok $a[0], Pair, 'Did we get a Pair in the List';
342-
ok ($a[0] eq "a\t1" or $a[0] eq "b\t2"), "We got one of the two choices";
339+
isa_ok $a, Pair, 'Did we get a Pair';
340+
ok ($a eq "a\t1" or $a eq "b\t2"), "We got one of the two choices";
343341

344342
my @a = $b.pickpairs(2);
345343
is +@a, 2, '.pickpairs(2) returns the right number of items';
@@ -368,7 +366,6 @@ sub showkv($x) {
368366
is @a.grep(* eq 'b').elems, 2 - @a.grep(* eq 'a').elems, '.grab(2) and the rest are "b"';
369367
is $b.total, 0, '.grab *should* change BagHash';
370368
#?rakudo.jvm todo "RT #120407"
371-
#?rakudo.moar todo "RT #120407"
372369
is $b.elems, 0, '.grab *should* change BagHash';
373370
}
374371

@@ -381,7 +378,6 @@ sub showkv($x) {
381378
is @a.grep(* eq 'b').elems, 2, '.grab(*) (2)';
382379
is $b.total, 0, '.grab *should* change BagHash';
383380
#?rakudo.jvm todo "RT #120407"
384-
#?rakudo.moar todo "RT #120407"
385381
is $b.elems, 0, '.grab *should* change BagHash';
386382
}
387383

0 commit comments

Comments
 (0)