Wrong tests
In the exercise description 13 is 6th number while in tests it's 5th, I changed it to be consistent with python version
@@ -2,23 +2,23 @@ use nth_prime as np;
#[test]
fn test_first_prime() {
- assert_eq!(np::nth(0), 2);
+ assert_eq!(np::nth(1), 2);
}
#[test]
#[ignore]
fn test_second_prime() {
- assert_eq!(np::nth(1), 3);
+ assert_eq!(np::nth(2), 3);
}
#[test]
#[ignore]
fn test_sixth_prime() {
- assert_eq!(np::nth(5), 13);
+ assert_eq!(np::nth(6), 13);
}
#[test]
#[ignore]
fn test_big_prime() {
- assert_eq!(np::nth(10000), 104743);
+ assert_eq!(np::nth(10001), 104743);
}
