Skip to content

Commit 246481f

Browse files
committed
Add missing plans to subtests
Closes #485 S#485
1 parent 7780ce3 commit 246481f

File tree

30 files changed

+101
-69
lines changed

30 files changed

+101
-69
lines changed

APPENDICES/A03-older-specs/01-misc.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,22 +220,22 @@ group-of 7 => 'now-deprecated subst-mutate' => {
220220
subtest '.subst-mutate with multi-match args set $/ to a List of matches' => {
221221
plan 2*(2+5);
222222
for 1234567, '1234567' -> $type {
223-
subtest "$type.^name().subst-mutate: :g" => {
223+
group-of 4 => "$type.^name().subst-mutate: :g" => {
224224
($ = $type).subst-mutate(:g, /../, 'XX');
225225
isa-ok $/, List, '$/ is a List…';
226226
cmp-ok +$/, '==', 3, '…with 3 items…';
227227
is-deeply $/.map({.WHAT}).unique, (Match,).Seq, '…all are Match…';
228228
is-deeply $/.map(~*), <12 34 56>.map(*.Str), '…all have right values';
229229
}
230-
subtest ".subst-mutate: :x" => {
230+
group-of 4 => ".subst-mutate: :x" => {
231231
($ = $type).subst-mutate(:2x, /../, 'XX');
232232
isa-ok $/, List, '$/ is a List…';
233233
cmp-ok +$/, '==', 2, '…with 2 items…';
234234
is-deeply $/.map({.WHAT}).unique, (Match,).Seq, '…all are Match…';
235235
is-deeply $/.map(~*), <12 34>.map(*.Str), '…all have right values';
236236
}
237237
for <nth st nd rd th> -> $suffix {
238-
subtest ".subst-mutate: :$suffix" => {
238+
group-of 4 => ".subst-mutate: :$suffix" => {
239239
($ = $type).subst-mutate(|($suffix => 1..3), /../, 'XX');
240240
isa-ok $/, List, '$/ is a List…';
241241
cmp-ok +$/, '==', 3, '…with 3 items…';

S02-types/baghash.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use v6;
2+
use lib $?FILE.IO.parent(2).add: 'packages';
23
use Test;
4+
use Test::Util;
35

46
plan 304;
57

@@ -591,7 +593,7 @@ subtest '.hash does not cause keys to be stringified' => {
591593
is-deeply $bh.Mix, Mix.new(<a a b>), '.Mix values are correct';
592594
}
593595

594-
subtest 'BagHash autovivification of non-existent keys' => {
596+
group-of 10 => 'BagHash autovivification of non-existent keys' => {
595597
my BagHash $bh1;
596598
is-deeply $bh1<poinc>++, 0, 'correct return of postfix ++';
597599
is-deeply $bh1<poinc>, 1, 'correct result of postfix ++';

S02-types/mixhash.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ subtest '.hash does not cause keys to be stringified' => {
513513
'negative MixHash weights removed from Bag coercion without warnings';
514514
}
515515

516-
subtest 'MixHash autovivification of non-existent keys' => {
516+
group-of 10 => 'MixHash autovivification of non-existent keys' => {
517517
my MixHash $mh1;
518518
is-deeply $mh1<poinc>++, 0, 'correct return of postfix ++';
519519
is-deeply $mh1<poinc>, 1, 'correct result of postfix ++';

S02-types/native.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use v6;
2+
use lib $?FILE.IO.parent(2).add: 'packages';
23
use Test;
4+
use Test::Util;
35

46
plan 92;
57

@@ -340,7 +342,7 @@ dies-ok { EVAL 'my str $x = Str;' }, '"my str $x = Str" dies';
340342
# RT #127813
341343
#?rakudo.jvm todo 'Expected a native int argument for $a; works standalone, probably wrong multi selected'
342344
{
343-
subtest 'using native types as named parameters', {
345+
group-of 13 => 'using native types as named parameters' => {
344346
eval-lives-ok '-> int :$x { $x == 1 or die }(:x( 1 ))', 'int ';
345347
eval-lives-ok '-> int8 :$x { $x == 1 or die }(:x( 1 ))', 'int8 ';
346348
eval-lives-ok '-> int16 :$x { $x == 1 or die }(:x( 1 ))', 'int16 ';

S02-types/sethash.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ subtest '.hash does not cause keys to be stringified' => {
477477
is-deeply $sh.SetHash, $sh, '.SetHash returns self';
478478
}
479479

480-
subtest 'SetHash autovivification of non-existent keys' => {
480+
group-of 10 => 'SetHash autovivification of non-existent keys' => {
481481
# Sets' values are just True/False, so all of the following operations
482482
# simply control existence of a key
483483
my SetHash $sh1;

S03-metaops/misc.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ subtest 'cover metaop call simplification optimization' => {
4343
is-deeply $a, 1040, '(1)';
4444
}
4545
subtest 'array var with ((||=) += )' => {
46-
my @a = 20; (@a ||= 42) += 10; dd @a
46+
plan 1;
47+
my @a = 20; (@a ||= 42) += 10;
48+
is-deeply @a, [11], '(1)';
4749
}
4850

4951
# https://github.com/rakudo/rakudo/issues/1989

S03-operators/arith.t

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use v6;
2+
use lib $?FILE.IO.parent(2).add: 'packages';
23
use Test;
4+
use Test::Util;
5+
36
plan 158;
47

58
my $five = abs(-5);
@@ -392,7 +395,7 @@ isa-ok 4 % 1.1, Rat, 'infix:<%> returns Rat when it can';
392395
isa-ok 4.8 % 1.1, Rat, 'infix:<%> returns Rat when it can';
393396

394397
# RT #132083 - Broken math
395-
subtest '-0x7FFFFFFF - 1 math weirdness' => {
398+
group-of 3 => '-0x7FFFFFFF - 1 math weirdness' => {
396399
is-deeply -0x7FFFFFFF - 1 == -2147483648, True, '== -2147483648';
397400
is-deeply -0x7FFFFFFF - 1 == -18446744071562067968, False,
398401
'== -18446744071562067968';

S03-smartmatch/range-range.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ subtest 'smartmatch against numeric range' => {
4343
2e0..3, 2e0..3e0, 2e0..3.0, 2e0..fr3,
4444
2.0..3, 2.0..3e0, 2.0..3.0, 2.0..fr3,
4545
fr2..3, fr2..fr3, fr2..fr3, fr2..fr3;
46-
constant $plan = 2 + @variants * (@true + @false);
46+
plan 2 + @variants * (@true + @false);
4747
is-deeply 3..4 ~~ -1/0..1/0, True, ' 3..4 ~~ -1/0..1/0';
4848
is-deeply 0/0..0/0 ~~ -1/0..1/0, False, '0/0..0/0 ~~ -1/0..1/0';
4949

@@ -79,7 +79,7 @@ subtest 'smartmatch numeric range against string range [numeric strings]' => {
7979
constant @false = 0..30, 0..fr30, 0..30e0, 0..30.0, 0..30/1,
8080
0e0..30, fr0..fr30, 0.0..30e0, 0e0..30.0, 0e0..30/1;
8181
constant @variants = '0'..3, '0'..3.0, '0'..3e0, '0'..fr3;
82-
constant $plan = @variants * (@true + @false);
82+
plan @variants * (@true + @false);
8383

8484
for @variants -> $r {
8585
is-deeply $_ ~~ $r, True, "{.perl} ~~ {$r.perl}" for @true;

S04-declarations/my.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use v6;
2+
use lib $?FILE.IO.parent(2).add: 'packages';
23
use Test;
4+
use Test::Util;
35

46
plan 110;
57

@@ -382,7 +384,7 @@ eval-lives-ok 'multi f(@a) { }; multi f(*@a) { }; f(my @a = (1, 2, 3))',
382384
}
383385

384386
# RT #126125
385-
subtest 'report Malformed my correctly' => {
387+
group-of 2 => 'report Malformed my correctly' => {
386388
throws-like q[my Any :D $a], X::Syntax::Malformed;
387389
throws-like q[my Any ^:D $a], X::Syntax::Malformed;
388390
}

S05-substitution/subst.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ subtest 'List/Match result adverb handling' => {
574574
# can result in either a Match or a List of Matches in $/
575575
plan 3;
576576

577-
subtest ':2nd:g' => {
577+
group-of 2 => ':2nd:g' => {
578578
subtest 'S///' => {
579579
plan 3;
580580
is-deeply (S:2nd:g/./Z/ with 'abc'), 'aZc', 'return value';
@@ -592,7 +592,7 @@ subtest 'List/Match result adverb handling' => {
592592
}
593593
}
594594

595-
subtest ':x(1..3)' => {
595+
group-of 2 => ':x(1..3)' => {
596596
subtest 'S///' => {
597597
plan 3;
598598
is-deeply (S:x(1..3)/./Z/ with 'abcd'), 'ZZZd', 'return value';
@@ -610,7 +610,7 @@ subtest 'List/Match result adverb handling' => {
610610
}
611611
}
612612

613-
subtest ':th(1, 3)' => {
613+
group-of 2 => ':th(1, 3)' => {
614614
subtest 'S///' => {
615615
plan 3;
616616
is-deeply (S:th(1, 3)/./Z/ with 'abcd'), 'ZbZd', 'return value';
@@ -644,22 +644,22 @@ subtest '.subst(Str:D, Str:D)' => {
644644
subtest '.subst with multi-match args set $/ to a List of matches' => {
645645
plan 2*(2+5);
646646
for 1234567, '1234567' -> $type {
647-
subtest "$type.^name().subst: :g" => {
647+
group-of 4 => "$type.^name().subst: :g" => {
648648
($ = $type).subst(:g, /../, 'XX');
649649
isa-ok $/, List, '$/ is a List…';
650650
cmp-ok +$/, '==', 3, '…with 3 items…';
651651
is-deeply $/.map({.WHAT}).unique, (Match,).Seq, '…all are Match…';
652652
is-deeply $/.map(~*), <12 34 56>.map(*.Str), '…all have right values';
653653
}
654-
subtest ".subst: :x" => {
654+
group-of 4 => ".subst: :x" => {
655655
($ = $type).subst(:2x, /../, 'XX');
656656
isa-ok $/, List, '$/ is a List…';
657657
cmp-ok +$/, '==', 2, '…with 2 items…';
658658
is-deeply $/.map({.WHAT}).unique, (Match,).Seq, '…all are Match…';
659659
is-deeply $/.map(~*), <12 34>.map(*.Str), '…all have right values';
660660
}
661661
for <nth st nd rd th> -> $suffix {
662-
subtest ".subst: :$suffix" => {
662+
group-of 4 => ".subst: :$suffix" => {
663663
($ = $type).subst(|($suffix => 1..3), /../, 'XX');
664664
isa-ok $/, List, '$/ is a List…';
665665
cmp-ok +$/, '==', 3, '…with 3 items…';

0 commit comments

Comments
 (0)