Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leap: Add years that refute some unusual factors #1581

Merged
merged 1 commit into from
Sep 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 25 additions & 1 deletion exercises/leap/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "leap",
"version": "1.5.1",
"version": "1.6.0",
"cases": [
{
"description": "year not divisible by 4 in common year",
Expand All @@ -26,6 +26,14 @@
},
"expected": true
},
{
"description": "year divisible by 4 and 5 is still a leap year",
"property": "leapYear",
"input": {
"year": 1960
},
"expected": true
},
{
"description": "year divisible by 100, not divisible by 400 in common year",
"property": "leapYear",
Expand All @@ -34,6 +42,14 @@
},
"expected": false
},
{
"description": "year divisible by 100 but not by 3 is still not a leap year",
"property": "leapYear",
"input": {
"year": 1900
},
"expected": false
},
{
"description": "year divisible by 400 in leap year",
"property": "leapYear",
Expand All @@ -42,6 +58,14 @@
},
"expected": true
},
{
"description": "year divisible by 400 but not by 125 is still a leap year",
"property": "leapYear",
"input": {
"year": 2400
},
"expected": true
},
{
"description": "year divisible by 200, not divisible by 400 in common year",
"property": "leapYear",
Expand Down