Test: Wrong character test

This commit is contained in:
Jonas Zeunert
2024-02-18 17:18:23 +01:00
parent 68e4a75423
commit 34c8d01a23

View File

@@ -135,7 +135,16 @@ mod tests {
#[should_panic(expected = "Input must have dimension of size 2x2")] #[should_panic(expected = "Input must have dimension of size 2x2")]
fn test_parse_field_too_short_input() { fn test_parse_field_too_short_input() {
let input = "1 2 3"; let input = "1 2 3";
let field_size = 2; let field_size = 3;
let _ = parse_playfield(&input.to_string(), field_size);
}
#[test]
#[should_panic(expected = "Input must contain only digits followed by space")]
fn test_parse_field_wrong_character() {
let input = "1 2 3 0 0 0 3 2 a";
let field_size = 3;
let _ = parse_playfield(&input.to_string(), field_size); let _ = parse_playfield(&input.to_string(), field_size);
} }