tracks/perl5/exercises/leap/.meta/exercise-data.yaml in trackler-2.2.1.179 vs tracks/perl5/exercises/leap/.meta/exercise-data.yaml in trackler-2.2.1.180

- old
+ new

@@ -1,11 +1,11 @@ exercise: Leap -version: 3 +version: 4 plan: 5 subs: is_leap tests: |- - is is_leap($_->{input}{year}), $_->{expected}, $_->{description} foreach @{$C_DATA->{cases}}; + ok !(is_leap($_->{input}{year}) xor $_->{expected}), $_->{description} foreach @{$C_DATA->{cases}}; exercise_comment: '# The name of this exercise.' version_comment: '# The version we will be matching against the exercise.' lib_comment: '# Look for the module inside the same directory as this test file.' plan_comment: '# This is how many tests we expect to run.' @@ -15,12 +15,10 @@ # your code don't think you've made a mistake if things have changed! example: |- sub is_leap { my $year = shift; - divisible_by($year, 400) - or divisible_by($year, 4) and !divisible_by($year, 100) - ? 1 : 0; + divisible_by($year, 400) or divisible_by($year, 4) and !divisible_by($year, 100); } sub divisible_by { $_[0] % $_[1] == 0 ? 1 : 0; }