mod decline; use decline::{verify_declension}; use verba::adjective::{Adjective}; use verba::adjective as A; #[test] fn test_altus_masculine() { let dictionary = A::DictionaryForm::Three("altus".to_string(), "alta".to_string(), "altum".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["altus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["altī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["altō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["altum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["altō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["alte".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["altī".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["altōrum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["altōs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["altī".to_string()])); }, Err(_) => panic!("Failed to create adjective altus, alta, altum."), } } #[test] fn test_altus_feminine() { let dictionary = A::DictionaryForm::Three("altus".to_string(), "alta".to_string(), "altum".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["alta".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["altae".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["altae".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["altam".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["altā".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["alta".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["altae".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["altārum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["altās".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["altae".to_string()])); }, Err(_) => panic!("Failed to create adjective altus, alta, altum."), } } #[test] fn test_altus_neuter() { let dictionary = A::DictionaryForm::Three("altus".to_string(), "alta".to_string(), "altum".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["altum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["altī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["altō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["altum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["altō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["altum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["alta".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["altōrum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["alta".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["altīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["alta".to_string()])); }, Err(_) => panic!("Failed to create adjective altus, alta, altum."), } } #[test] fn test_atrox_masculine() { let dictionary = A::DictionaryForm::Two("atrōx".to_string(), "atrōcis".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["atrōcis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["atrōcem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["atrōcēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["atrōcium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["atrōcēs".to_string(), "atrōcīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["atrōcēs".to_string()])); }, Err(_) => panic!("Failed to create adjective atrōx, atrōcis."), } } #[test] fn test_atrox_feminine() { let dictionary = A::DictionaryForm::Two("atrōx".to_string(), "atrōcis".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["atrōcis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["atrōcem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["atrōcēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["atrōcium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["atrōcēs".to_string(), "atrōcīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["atrōcēs".to_string()])); }, Err(_) => panic!("Failed to create adjective atrōx, atrōcis."), } } #[test] fn test_atrox_neuter() { let dictionary = A::DictionaryForm::Two("atrōx".to_string(), "atrōcis".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["atrōcis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["atrōcī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["atrōx".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["atrōcia".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["atrōcium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["atrōcia".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["atrōcibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["atrōcia".to_string()])); }, Err(_) => panic!("Failed to create adjective atrōx, atrōcis."), } } #[test] fn test_agilis_masculine() { let dictionary = A::DictionaryForm::Two("agilis".to_string(), "agile".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["agilem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["agilēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["agilium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["agilēs".to_string(), "agilīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["agilēs".to_string()])); }, Err(_) => panic!("Failed to create adjective agilis, agile."), } } #[test] fn test_agilis_feminine() { let dictionary = A::DictionaryForm::Two("agilis".to_string(), "agile".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["agilem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["agilēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["agilium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["agilēs".to_string(), "agilīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["agilēs".to_string()])); }, Err(_) => panic!("Failed to create adjective agilis, agile."), } } #[test] fn test_agilis_neuter() { let dictionary = A::DictionaryForm::Two("agilis".to_string(), "agile".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["agile".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["agilis".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["agile".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["agilī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["agile".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["agilia".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["agilium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["agilia".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["agilibus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["agilia".to_string()])); }, Err(_) => panic!("Failed to create adjective agilis, agile."), } } #[test] fn test_celer_masculine() { let dictionary = A::DictionaryForm::Three("celer".to_string(), "celeris".to_string(), "celere".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["celer".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["celeris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["celerem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["celer".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["celerēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["celerium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["celerēs".to_string(), "celerīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["celerēs".to_string()])); }, Err(_) => panic!("Failed to create adjective celer, celeris, celere."), } } #[test] fn test_celer_feminine() { let dictionary = A::DictionaryForm::Three("celer".to_string(), "celeris".to_string(), "celere".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["celeris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["celeris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["celerem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["celeris".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["celerēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["celerium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["celerēs".to_string(), "celerīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["celerēs".to_string()])); }, Err(_) => panic!("Failed to create adjective celer, celeris, celere."), } } #[test] fn test_celer_neuter() { let dictionary = A::DictionaryForm::Three("celer".to_string(), "celeris".to_string(), "celere".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["celere".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["celeris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["celere".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["celerī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["celere".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["celeria".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["celerium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["celeria".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["celeribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["celeria".to_string()])); }, Err(_) => panic!("Failed to create adjective celer, celeris, celere."), } } #[test] fn test_alacer_masculine() { let dictionary = A::DictionaryForm::Three("alacer".to_string(), "alacris".to_string(), "alacre".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["alacer".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["alacris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["alacrem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["alacer".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["alacrēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["alacrium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["alacrēs".to_string(), "alacrīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["alacrēs".to_string()])); }, Err(_) => panic!("Failed to create adjective alacer, alacris, alacre."), } } #[test] fn test_alacer_feminine() { let dictionary = A::DictionaryForm::Three("alacer".to_string(), "alacris".to_string(), "alacre".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["alacris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["alacris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["alacrem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["alacris".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["alacrēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["alacrium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["alacrēs".to_string(), "alacrīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["alacrēs".to_string()])); }, Err(_) => panic!("Failed to create adjective alacer, alacris, alacre."), } } #[test] fn test_alacer_neuter() { let dictionary = A::DictionaryForm::Three("alacer".to_string(), "alacris".to_string(), "alacre".to_string()); match A::Regular::new(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["alacre".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["alacris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["alacre".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["alacrī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["alacre".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["alacria".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["alacrium".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["alacria".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["alacribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["alacria".to_string()])); }, Err(_) => panic!("Failed to create adjective alacer, alacris, alacre."), } } // Ūllus, ūlla, ūllum is used to test irregular first and second declension // adjectives commonly referred to by the acronym UNUS NAUTA. #[test] fn test_ullus_masculine() { let dictionary = A::DictionaryForm::Three("ūllus".to_string(), "ūlla".to_string(), "ūllum".to_string()); match A::Regular::new_first_second_ius_genitive(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["ūllus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["ūllīus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["ūllī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["ūllum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["ūllō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["ūlle".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["ūllī".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["ūllōrum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["ūllōs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["ūllī".to_string()])); }, Err(_) => panic!("Failed to create adjective ūllus, ūlla, ūllum."), } } #[test] fn test_ullus_feminine() { let dictionary = A::DictionaryForm::Three("ūllus".to_string(), "ūlla".to_string(), "ūllum".to_string()); match A::Regular::new_first_second_ius_genitive(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["ūlla".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["ūllīus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["ūllī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["ūllam".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["ūllā".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["ūlla".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["ūllae".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["ūllārum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["ūllās".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["ūllae".to_string()])); }, Err(_) => panic!("Failed to create adjective ūllus, ūlla, ūllum."), } } #[test] fn test_ullus_neuter() { let dictionary = A::DictionaryForm::Three("ūllus".to_string(), "ūlla".to_string(), "ūllum".to_string()); match A::Regular::new_first_second_ius_genitive(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["ūllum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["ūllīus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["ūllī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["ūllum".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["ūllō".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["ūllum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["ūlla".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["ūllōrum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["ūlla".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["ūllīs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["ūlla".to_string()])); }, Err(_) => panic!("Failed to create adjective ūllus, ūlla, ūllum."), } } // Vetus, vetus is used to test consonant stem third declension adjectives. #[test] fn test_vetus_masculine() { let dictionary = A::DictionaryForm::Two("vetus".to_string(), "veteris".to_string()); match A::Regular::new_thid_c_stem(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["veteris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Masculine), &Some(vec!["veterī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["veterem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["vetere".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Masculine), &Some(vec!["veterēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Masculine), &Some(vec!["veterum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Masculine), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Masculine), &Some(vec!["veterēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Masculine), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Masculine), &Some(vec!["veterēs".to_string()])); }, Err(_) => panic!("Failed to create adjective vetus, veteris."), } } #[test] fn test_vetus_feminine() { let dictionary = A::DictionaryForm::Two("vetus".to_string(), "veteris".to_string()); match A::Regular::new_thid_c_stem(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["veteris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Feminine), &Some(vec!["veterī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["veterem".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["vetere".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Feminine), &Some(vec!["veterēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Feminine), &Some(vec!["veterum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Feminine), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Feminine), &Some(vec!["veterēs".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Feminine), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Feminine), &Some(vec!["veterēs".to_string()])); }, Err(_) => panic!("Failed to create adjective vetus, veteris."), } } #[test] fn test_vetus_neuter() { let dictionary = A::DictionaryForm::Two("vetus".to_string(), "veteris".to_string()); match A::Regular::new_thid_c_stem(dictionary) { Ok(adjective) => { verify_declension(&adjective.decline(A::Number::Singular, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["veteris".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Dative, A::Gender::Neuter), &Some(vec!["veterī".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["vetere".to_string()])); verify_declension(&adjective.decline(A::Number::Singular, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["vetus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Nominative, A::Gender::Neuter), &Some(vec!["vetera".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Genitive, A::Gender::Neuter), &Some(vec!["veterum".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Dative, A::Gender::Neuter), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Accusative, A::Gender::Neuter), &Some(vec!["vetera".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Ablative, A::Gender::Neuter), &Some(vec!["veteribus".to_string()])); verify_declension(&adjective.decline(A::Number::Plural, A::Case::Vocative, A::Gender::Neuter), &Some(vec!["vetera".to_string()])); }, Err(_) => panic!("Failed to create adjective vetus, veteris."), } }