100-days-of-rust/Week-10/Day-66_ISBN-Generator/day66/tests/checker.rs

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