aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorE7-87-83 <fungcheokyin@gmail.com>2022-03-24 12:36:10 +0800
committerE7-87-83 <fungcheokyin@gmail.com>2022-03-24 12:36:10 +0800
commit50ff2a3572506d2aedd983ccc37096669ae622b6 (patch)
tree4850e5d2a5bcc52f2724d354c0cb8824f25875cb
parent1b46ed2b175343925f414d6557c5e356db544ba1 (diff)
downloadperlweeklychallenge-club-50ff2a3572506d2aedd983ccc37096669ae622b6.tar.gz
perlweeklychallenge-club-50ff2a3572506d2aedd983ccc37096669ae622b6.tar.bz2
perlweeklychallenge-club-50ff2a3572506d2aedd983ccc37096669ae622b6.zip
follow the standard order of test script writing
-rw-r--r--challenge-157/cheok-yin-fung/perl/ch-1.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/challenge-157/cheok-yin-fung/perl/ch-1.pl b/challenge-157/cheok-yin-fung/perl/ch-1.pl
index bdb01e53a6..c1879bb565 100644
--- a/challenge-157/cheok-yin-fung/perl/ch-1.pl
+++ b/challenge-157/cheok-yin-fung/perl/ch-1.pl
@@ -29,17 +29,17 @@ sub mean {
use Test::More tests => 3;
is_deeply(
- [4.8, 3.8, 2.8],
[sort {$b<=>$a} map {sprintf("%.1f", $_)} values mean(1,3,5,6,9)->%*],
+ [4.8, 3.8, 2.8],
"Example 1"
);
is_deeply(
- ["6.0", 5.2, 4.4],
[sort {$b<=>$a} map {sprintf("%.1f", $_)} values mean(2,4,6,8,10)->%*],
+ ["6.0", 5.2, 4.4],
"Example 2"
);
is_deeply(
- ["3.0", 2.6, 2.2],
[sort {$b<=>$a} map {sprintf("%.1f", $_)} values mean(1,2,3,4,5)->%*],
+ ["3.0", 2.6, 2.2],
"Example 3"
);