50 lines
834 B
Rust
50 lines
834 B
Rust
|
#[cfg(test)]
|
||
|
mod examples {
|
||
|
use day59::balanced_bonus;
|
||
|
|
||
|
#[test]
|
||
|
fn example1() {
|
||
|
assert!(balanced_bonus("xxxyyyzzz"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example2() {
|
||
|
assert!(balanced_bonus("abccbaabccba"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example3() {
|
||
|
assert!(!balanced_bonus("xxxyyyzzzz"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example4() {
|
||
|
assert!(balanced_bonus("abcdefghijklmnopqrstuvwxyz"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example5() {
|
||
|
assert!(!balanced_bonus("pqq"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example6() {
|
||
|
assert!(!balanced_bonus("fdedfdeffeddefeeeefddf"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example7() {
|
||
|
assert!(balanced_bonus("www"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example8() {
|
||
|
assert!(balanced_bonus("x"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example9() {
|
||
|
assert!(balanced_bonus(""));
|
||
|
}
|
||
|
}
|