tracks/perl6/exercises/luhn/luhn.t in trackler-2.2.1.61 vs tracks/perl6/exercises/luhn/luhn.t in trackler-2.2.1.62

- old
+ new

@@ -3,11 +3,11 @@ use Test; use lib my $dir = $?FILE.IO.dirname; use JSON::Fast; my Str:D $exercise := 'Luhn'; -my Version:D $version = v1; +my Version:D $version = v2; my Str $module //= $exercise; plan 15; use-ok $module or bail-out; require ::($module); @@ -20,10 +20,18 @@ } require ::($module) <&is-luhn-valid>; my $c-data = from-json $=pod.pop.contents; -is .<input>.&is-luhn-valid, |.<expected description> for @($c-data<cases>); +for $c-data<cases>.values { + given is-luhn-valid .<input> -> $result { + subtest .<description>, { + plan 2; + isa-ok $result, Bool; + is-deeply $result, .<expected>, 'Result matches expected'; + } + } +} =head2 Canonical Data =begin code {