This commit is contained in:
Lewis Wynne 2025-03-11 13:49:16 +00:00
parent 222e779da4
commit 04718f77b2
2 changed files with 14 additions and 4 deletions

View file

@ -73,6 +73,15 @@ fn test_words() {
assert_eq!(words.last, "fox.");
}
#[test]
fn test_word() {
let word = Word::new(String::from("fox"));
assert_eq!(word.unwrap().get(), "fox");
let word = Word::new(String::from(""));
word.unwrap();
}
#[test]
fn test_engine_gender() {
let mut e = Engine::new();
@ -89,7 +98,7 @@ fn test_engine_get_count() {
let mut e = Engine::new();
// i32 Into<IntOrString>>
for i in -1e3 as i32..1e3 as i32 {
for i in -1e2 as i32..1e2 as i32 {
assert_eq!(e.get_count(Some(i)), i);
}