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

Sync test leap 1.6.0 #857

Merged
merged 2 commits into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/leap/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: leap
version: 1.5.1.9
version: 1.6.0.10

dependencies:
- base
Expand Down
12 changes: 12 additions & 0 deletions exercises/leap/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,26 @@ cases = [ Case { description = "year not divisible by 4 in common year"
, input = 1996
, expected = True
}
, Case { description = "year divisible by 4 and 5 is still a leap year"
, input = 1960
, expected = True
}
, Case { description = "year divisible by 100, not divisible by 400 in common year"
, input = 2100
, expected = False
}
, Case { description = "year divisible by 100 but not by 3 is still not a leap year"
, input = 1900
, expected = False
}
, Case { description = "year divisible by 400 in leap year"
, input = 2000
, expected = True
}
, Case { description = "year divisible by 400 but not by 125 is still a leap year"
, input = 2400
, expected = True
}
, Case { description = "year divisible by 200, not divisible by 400 in common year"
, input = 1800
, expected = False
Expand Down