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

28 lines
376 B
Rust
Raw Normal View History

2024-09-29 08:44:21 +00:00
#[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();
}
}
}