Sha256: c231ea7c116bf641a45d6d22c7105f96fd608f0d81b335360aa6bd3612616820

Contents?: true

Size: 1.08 KB

Versions: 297

Compression:

Stored size: 1.08 KB

Contents

extern crate rotational_cipher as cipher;

#[test]
fn rotate_a_1() {
    assert_eq!("b", cipher::rotate("a", 1));
}

#[test]
#[ignore]
fn rotate_a_26() {
    assert_eq!("a", cipher::rotate("a", 26));
}

#[test]
#[ignore]
fn rotate_a_0() {
    assert_eq!("a", cipher::rotate("a", 0));
}

#[test]
#[ignore]
fn rotate_m_13() {
    assert_eq!("z", cipher::rotate("m", 13));
}

#[test]
#[ignore]
fn rotate_n_13_with_wrap() {
    assert_eq!("a", cipher::rotate("n", 13));
}

#[test]
#[ignore]
fn rotate_caps() {
    assert_eq!("TRL", cipher::rotate("OMG", 5));
}

#[test]
#[ignore]
fn rotate_spaces() {
    assert_eq!("T R L", cipher::rotate("O M G", 5));
}

#[test]
#[ignore]
fn rotate_numbers() {
    assert_eq!("Xiwxmrk 1 2 3 xiwxmrk", cipher::rotate("Testing 1 2 3 testing", 4));
}

#[test]
#[ignore]
fn rotate_punctuation() {
    assert_eq!("Gzo\'n zvo, Bmviyhv!", cipher::rotate("Let\'s eat, Grandma!", 21));
}

#[test]
#[ignore]
fn rotate_all_the_letters() {
    assert_eq!("Gur dhvpx oebja sbk whzcf bire gur ynml qbt.",
        cipher::rotate("The quick brown fox jumps over the lazy dog.", 13));
}

Version data entries

297 entries across 297 versions & 1 rubygems

Version Path
trackler-2.2.1.130 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.129 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.128 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.127 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.126 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.125 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.124 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.123 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.122 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.121 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.120 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.119 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.118 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.117 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.116 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.115 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.114 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.113 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.111 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.110 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs