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.171 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.170 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.169 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.167 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.166 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.165 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.164 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.163 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.162 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.161 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.160 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.159 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.158 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.157 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.156 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.155 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.154 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.153 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.152 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs
trackler-2.2.1.151 tracks/rust/exercises/rotational-cipher/tests/rotational-cipher.rs