algorithmz 1.0.5

This is the corresponding implemenation of the python module of the same name.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use algorithmz::set::find_keyboard_row;

#[test]
fn test_find_keyboard_row_empty() {
    let result = find_keyboard_row(vec![]);
    assert!(matches!(result, Err(ref e) if e == "Cannot verify if an empty list can be typed!"));
}
#[test]
fn test_find_keyboard_row_none_found() {
    let result = find_keyboard_row(vec!["wera".to_string(),"wdr".to_string(),"drw".to_string()]);
    assert!(matches!(result, Err(ref e) if e == "None of the words specified can be typed!"));
}
#[test]
fn test_find_keyboard_row() {
    let result = find_keyboard_row(vec!["were".to_string(),"quit".to_string(),"wtf".to_string()]).unwrap();
    assert_eq!(result,["were","quit"]);
}