1
Fork 0

Add more tests for 100% coverage.

This commit is contained in:
Bauke 2022-04-11 14:21:28 +02:00
parent 9b3e4b63f6
commit c637c55e42
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,9 @@ use test_case::test_case;
#[test_case(0, ""; "minimum")] #[test_case(0, ""; "minimum")]
#[test_case(3999, "MMMCMXCIX"; "maximum")] #[test_case(3999, "MMMCMXCIX"; "maximum")]
#[test_case(1666, "MDCLXVI"; "every character")] #[test_case(1666, "MDCLXVI"; "every character")]
#[test_case(1987, "MCMLXXXVII"; "all numbers 1")]
#[test_case(2654, "MMDCLIV"; "all numbers 2")]
#[test_case(321, "CCCXXI"; "all numbers 3")]
#[test_case(900, "CM"; "with subtracting")] #[test_case(900, "CM"; "with subtracting")]
#[test_case(20, "XX"; "without subtracting")] #[test_case(20, "XX"; "without subtracting")]
fn test_integer_to_roman(input: i32, expected: &str) { fn test_integer_to_roman(input: i32, expected: &str) {