mod decline; use decline::{verify_declension}; use verba::noun::{Noun}; use verba::noun as N; #[test] fn test_first_declension() { let nom = "porta".to_string(); let gen = "portae".to_string(); match N::Regular::new(nom, gen, N::Gender::Feminine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["porta".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["portae".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["portae".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["portam".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["portā".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["porta".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["portae".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["portārum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["portīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["portās".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["portīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["portae".to_string()])); }, Err(_) => panic!("Failed to create noun porta, portae."), } } #[test] fn test_second_declension_masculine() { let nom = "dominus".to_string(); let gen = "dominī".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["dominus".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["dominī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["dominō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["dominum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["dominō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["domine".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["dominī".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["dominōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["dominīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["dominōs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["dominīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["dominī".to_string()])); }, Err(_) => panic!("Failed to create noun dominus, dominī"), } } #[test] fn test_second_declension_masculine_ius() { let nom = "fīlius".to_string(); let gen = "fīliī".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["fīlius".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["fīliī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["fīliō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["fīlium".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["fīliō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["fīlī".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["fīliī".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["fīliōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["fīliīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["fīliōs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["fīliīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["fīliī".to_string()])); }, Err(_) => panic!("Failed to create noun fīlius, fīliī"), } } #[test] fn test_second_declension_masculine_er() { let nom = "puer".to_string(); let gen = "puerī".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["puer".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["puerī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["puerō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["puerum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["puerō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["puer".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["puerī".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["puerōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["puerīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["puerōs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["puerīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["puerī".to_string()])); }, Err(_) => panic!("Failed to create noun puer, puerī"), } } #[test] fn test_second_declension_masculine_r() { let nom = "ager".to_string(); let gen = "agrī".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["ager".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["agrī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["agrō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["agrum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["agrō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["ager".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["agrī".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["agrōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["agrīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["agrōs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["agrīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["agrī".to_string()])); }, Err(_) => panic!("Failed to create noun ager, agrī"), } } #[test] fn test_second_declension_neuter() { let nom = "bellum".to_string(); let gen = "bellī".to_string(); match N::Regular::new(nom, gen, N::Gender::Neuter) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["bellum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["bellī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["bellō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["bellum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["bellō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["bellum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["bella".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["bellōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["bellīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["bella".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["bellīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["bella".to_string()])); }, Err(_) => panic!("Failed to create noun bellum, bellī"), } } #[test] fn test_second_declension_neuter_ium() { let nom = "auxilium".to_string(); let gen = "auxiliī".to_string(); match N::Regular::new(nom, gen, N::Gender::Neuter) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["auxilium".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["auxiliī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["auxiliō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["auxilium".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["auxiliō".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["auxilium".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["auxilia".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["auxiliōrum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["auxiliīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["auxilia".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["auxiliīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["auxilia".to_string()])); }, Err(_) => panic!("Failed to create noun auxilium, auxiliī"), } } #[test] fn test_third_declension_masculine() { let nom = "dux".to_string(); let gen = "ducis".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["dux".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["ducis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["ducī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["ducem".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["duce".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["dux".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["ducēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["ducum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["ducibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["ducēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["ducibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["ducēs".to_string()])); }, Err(_) => panic!("Failed to create noun dux, ducis"), } } #[test] fn test_third_declension_feminine() { let nom = "virtūs".to_string(); let gen = "virtūtis".to_string(); match N::Regular::new(nom, gen, N::Gender::Feminine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["virtūs".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["virtūtis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["virtūtī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["virtūtem".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["virtūte".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["virtūs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["virtūtēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["virtūtum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["virtūtibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["virtūtēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["virtūtibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["virtūtēs".to_string()])); }, Err(_) => panic!("Failed to create noun virtūs, virtūtis"), } } #[test] fn test_third_declension_neuter() { let nom = "nōmen".to_string(); let gen = "nōminis".to_string(); match N::Regular::new(nom, gen, N::Gender::Neuter) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["nōmen".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["nōminis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["nōminī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["nōmen".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["nōmine".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["nōmen".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["nōmina".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["nōminum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["nōminibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["nōmina".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["nōminibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["nōmina".to_string()])); }, Err(_) => panic!("Failed to create noun nōmen, nōminis"), } } #[test] fn test_third_declension_i_stem_pure_masculine() { let nom = "amnis".to_string(); let gen = "amnis".to_string(); match N::Regular::new_third_i_stem(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["amnis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["amnis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["amnī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["amnem".to_string(), "amnim".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["amne".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["amnis".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["amnēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["amnium".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["amnibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["amnēs".to_string(), "amnīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["amnibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["amnēs".to_string()])); }, Err(_) => panic!("Failed to create noun amnis, amnis"), } } #[test] fn test_third_declension_i_stem_pure_neuter() { let nom = "animal".to_string(); let gen = "animālis".to_string(); match N::Regular::new_third_i_stem(nom, gen, N::Gender::Neuter) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["animal".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["animālis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["animālī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["animal".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["animālī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["animal".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["animālia".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["animālium".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["animālibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["animālia".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["animālibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["animālia".to_string()])); }, Err(_) => panic!("Failed to create noun animal, animālis"), } } #[test] fn test_third_declension_i_stem_mixed_feminine() { let nom = "pars".to_string(); let gen = "partis".to_string(); match N::Regular::new_third_i_stem(nom, gen, N::Gender::Feminine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["pars".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["partis".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["partī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["partem".to_string(), "partim".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["parte".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["pars".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["partēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["partium".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["partibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["partēs".to_string(), "partīs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["partibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["partēs".to_string()])); }, Err(_) => panic!("Failed to create noun pars, partis"), } } #[test] fn test_fourth_declension_masculine() { let nom = "portus".to_string(); let gen = "portūs".to_string(); match N::Regular::new(nom, gen, N::Gender::Masculine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["portus".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["portūs".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["portuī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["portum".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["portū".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["portus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["portūs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["portuum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["portibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["portūs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["portibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["portūs".to_string()])); }, Err(_) => panic!("Failed to create noun portus, portūs"), } } #[test] fn test_fourth_declension_neuter() { let nom = "cornū".to_string(); let gen = "cornūs".to_string(); match N::Regular::new(nom, gen, N::Gender::Neuter) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["cornū".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["cornūs".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["cornū".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["cornū".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["cornū".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["cornū".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["cornua".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["cornuum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["cornibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["cornua".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["cornibus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["cornua".to_string()])); }, Err(_) => panic!("Failed to create noun cornū, cornūs"), } } #[test] fn test_fifth_declension_dies() { let nom = "diēs".to_string(); let gen = "diēī".to_string(); match N::Regular::new(nom, gen, N::Gender::Feminine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["diēs".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["diēī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["diēī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["diem".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["diē".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["diēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["diēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["diērum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["diēbus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["diēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["diēbus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["diēs".to_string()])); }, Err(_) => panic!("Failed to create noun diēs, diēī"), } } #[test] fn test_fifth_declension_res() { let nom = "rēs".to_string(); let gen = "reī".to_string(); match N::Regular::new(nom, gen, N::Gender::Feminine) { Ok(noun) => { verify_declension(&noun.decline(N::Number::Singular, N::Case::Nominative), &Some(vec!["rēs".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Genitive), &Some(vec!["reī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Dative), &Some(vec!["reī".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Accusative), &Some(vec!["rem".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Ablative), &Some(vec!["rē".to_string()])); verify_declension(&noun.decline(N::Number::Singular, N::Case::Vocative), &Some(vec!["rēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Nominative), &Some(vec!["rēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Genitive), &Some(vec!["rērum".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Dative), &Some(vec!["rēbus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Accusative), &Some(vec!["rēs".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Ablative), &Some(vec!["rēbus".to_string()])); verify_declension(&noun.decline(N::Number::Plural, N::Case::Vocative), &Some(vec!["rēs".to_string()])); }, Err(_) => panic!("Failed to create noun rēs, reī"), } }