1
Fork 0
leetcode/tests/excel_sheet_column_number.rs

12 lines
358 B
Rust

use leetcode::excel_sheet_column_number::title_to_number;
use test_case::test_case;
#[test_case("A", 1; "minimum")]
#[test_case("FXSHRXW", i32::MAX; "maximum")]
#[test_case("AB", 28; "double")]
#[test_case("AZY", 1377; "triple")]
fn test_excel_sheet_column_number(input: &str, expected: i32) {
assert_eq!(title_to_number(input.to_string()), expected);
}