exercism/rust/leap/tests/leap.rs

25 lines
394 B
Rust
Raw Normal View History

2016-08-13 23:20:14 +00:00
extern crate leap;
#[test]
fn test_vanilla_leap_year() {
assert_eq!(leap::is_leap_year(1996), true);
}
#[test]
#[ignore]
fn test_any_old_year() {
assert_eq!(leap::is_leap_year(1997), false);
}
#[test]
#[ignore]
fn test_century() {
assert_eq!(leap::is_leap_year(1900), false);
}
#[test]
#[ignore]
fn test_exceptional_century() {
assert_eq!(leap::is_leap_year(2000), true);
}