Sha256: bd9b2b6ac55222d42f50c04c9a05a96eb3fb90c84be24000a27219262999bbf0

Contents?: true

Size: 1.62 KB

Versions: 115

Compression:

Stored size: 1.62 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

115 entries across 115 versions & 1 rubygems

Version Path
trackler-2.2.1.171 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.170 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.169 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.167 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.166 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.165 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.164 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.163 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.162 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.161 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.160 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.159 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.158 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.157 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.156 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.155 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.154 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.153 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.152 tracks/rust/exercises/isogram/tests/isogram.rs
trackler-2.2.1.151 tracks/rust/exercises/isogram/tests/isogram.rs