100-days-of-rust/Week-02/Day-08_Letter-Combinations-Of-A-Phone-Number/day8/tests/examples.rs

20 lines
332 B
Rust
Raw Permalink Normal View History

2024-08-02 19:50:37 +00:00
use day8::combination;
#[test]
fn example1() {
assert_eq!(
combination("23"),
vec!["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]
);
}
#[test]
fn example2() {
assert_eq!(combination(""), vec![] as Vec<String>);
}
#[test]
fn example3() {
assert_eq!(combination("2"), vec!["a", "b", "c"]);
}