Sha256: fcd61597e213d64b758dac6274a2b822a1c21d9722a1ed8d7d0be04fa072a314

Contents?: true

Size: 1.63 KB

Versions: 384

Compression:

Stored size: 1.63 KB

Contents

extern crate atbash_cipher as cipher;

#[test]
fn test_encode_yes() {
    assert_eq!("bvh", cipher::encode("yes"));
}

#[test]
#[ignore]
fn test_encode_no() {
    assert_eq!("ml", cipher::encode("no"));
}

#[test]
#[ignore]
fn test_encode_omg() {
    assert_eq!("lnt", cipher::encode("OMG"));
}

#[test]
#[ignore]
fn test_encode_spaces() {
    assert_eq!("lnt", cipher::encode("O M G"));
}

#[test]
#[ignore]
fn test_encode_mindblowingly() {
    assert_eq!("nrmwy oldrm tob", cipher::encode("mindblowingly"));
}

#[test]
#[ignore]
fn test_encode_numbers() {
    assert_eq!("gvhgr mt123 gvhgr mt", cipher::encode("Testing,1 2 3, testing."));
}

#[test]
#[ignore]
fn test_encode_deep_thought() {
    assert_eq!("gifgs rhurx grlm", cipher::encode("Truth is fiction."));
}

#[test]
#[ignore]
fn test_encode_all_the_letters() {
    assert_eq!("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
        cipher::encode("The quick brown fox jumps over the lazy dog."));
}

#[test]
#[ignore]
fn test_encode_ignores_non_ascii() {
    assert_eq!("mlmzh xrrrt mlivw", cipher::encode("non ascii éignored"));
}


#[test]
#[ignore]
fn test_decode_exercism() {
    assert_eq!("exercism", cipher::decode("vcvix rhn"));
}

#[test]
#[ignore]
fn test_decode_a_sentence() {
    assert_eq!("anobstacleisoftenasteppingstone",
        cipher::decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v"));
}

#[test]
#[ignore]
fn test_decode_numbers() {
    assert_eq!("testing123testing", cipher::decode("gvhgr mt123 gvhgr mt"));
}

#[test]
#[ignore]
fn test_decode_all_the_letters() {
    assert_eq!("thequickbrownfoxjumpsoverthelazydog",
        cipher::decode("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"));
}

Version data entries

384 entries across 384 versions & 1 rubygems

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