100-days-of-rust/Week-01/Day-05_Pair-Of-Socks/pair_of_socks/tests/examples_sockpairs.rs
2024-07-30 11:17:39 +02:00

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);
}