17 lines
248 B
Rust
17 lines
248 B
Rust
use pair_of_socks::sock_pairs;
|
|
|
|
#[test]
|
|
fn one_sock_pair() {
|
|
assert_eq!(sock_pairs("AA"), 1);
|
|
}
|
|
|
|
#[test]
|
|
fn two_sock_pair() {
|
|
assert_eq!(sock_pairs("ABABC"), 2);
|
|
}
|
|
|
|
#[test]
|
|
fn four_sock_pair() {
|
|
assert_eq!(sock_pairs("CABBACCC"), 4);
|
|
}
|