Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Add simple test
Browse files Browse the repository at this point in the history
The first test assures that our week number is between 1 and 53.
  • Loading branch information
cristeahub committed Oct 6, 2015
1 parent 7dea9d0 commit 0fd436f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@ fn main() {
println!("{}", get_week_number());
}
}

#[test]
fn week_number_should_be_between_1_and_53() {
if let 1...53 = get_week_number() {
assert!(true, "Week number is between 1 and 53");
} else {
assert!(false, "Week number is not between 1 and 53");
}
}

0 comments on commit 0fd436f

Please sign in to comment.