28 lines
376 B
Rust
28 lines
376 B
Rust
|
#[cfg(test)]
|
||
|
mod checker {
|
||
|
use day66::*;
|
||
|
|
||
|
fn check() {
|
||
|
assert!(isbn_validator(isbn_generator().trim()).unwrap());
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn gen1() {
|
||
|
check();
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn gen10() {
|
||
|
for _ in 0..10 {
|
||
|
check();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn gen100() {
|
||
|
for _ in 0..100 {
|
||
|
check();
|
||
|
}
|
||
|
}
|
||
|
}
|