Sha256: 57e66f3c163b4923e724c66aada76e870fc080302ba81158a15a6321ee141b1f

Contents?: true

Size: 1.59 KB

Versions: 9

Compression:

Stored size: 1.59 KB

Contents

extern crate isogram;

use isogram::check;

#[test]
fn empty_string() {
    assert_eq!(check(""), true, "An empty string should be an isogram.")
}

#[test]
#[ignore]
fn only_lower_case_characters() {
    assert_eq!(check("isogram"), true, "\"isogram\" should be an isogram.")
}

#[test]
#[ignore]
fn one_duplicated_character() {
    assert_eq!(
        check("eleven"),
        false,
        "\"eleven\" has more than one \'e\', therefore it is no isogram."
    )
}

#[test]
#[ignore]
fn longest_reported_english_isogram() {
    assert_eq!(
        check("subdermatoglyphic"),
        true,
        "\"subdermatoglyphic\" should be an isogram."
    )
}

#[test]
#[ignore]
fn one_duplicated_character_mixed_case() {
    assert_eq!(
        check("Alphabet"),
        false,
        "\"Alphabet\" has more than one \'a\', therefore it is no isogram."
    )
}

#[test]
#[ignore]
fn hypothetical_isogramic_word_with_hyphen() {
    assert_eq!(
        check("thumbscrew-japingly"),
        true,
        "\"thumbscrew-japingly\" should be an isogram."
    )
}

#[test]
#[ignore]
fn isogram_with_duplicated_hyphen() {
    assert_eq!(
        check("six-year-old"),
        true,
        "\"six-year-old\" should be an isogram."
    )
}

#[test]
#[ignore]
fn made_up_name_that_is_an_isogram() {
    assert_eq!(
        check("Emily Jung Schwartzkopf"),
        true,
        "\"Emily Jung Schwartzkopf\" should be an isogram."
    )
}

#[test]
#[ignore]
fn duplicated_character_in_the_middle() {
    assert_eq!(
        check("accentor"),
        false,
        "\"accentor\" has more than one \'c\', therefore it is no isogram."
    )
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.179 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.178 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.177 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.176 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.175 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.174 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.173 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.172 tracks/rust/exercises/isogram/tests/isogram.rs