Skip to content

Commit

Permalink
add test for zero-length case
Browse files Browse the repository at this point in the history
Added a test to check for correct behavior when passing 0 as len
  • Loading branch information
Kurlgargyey authored May 6, 2024
1 parent 7946b9b commit 969c05e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions exercises/practice/series/tests/series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,13 @@ fn empty_series_is_invalid() {
let expected: &[&str] = &[];
assert_eq!(output, expected);
}

#[test]
#[ignore]
fn zero_length_series_returns_empty_strings() {
let input = "12345";
let length = 0;
let output = series(input, length);
let expected: &[&str] = &[""; 6];
assert_eq!(output, expected)
}

0 comments on commit 969c05e

Please sign in to comment.