Sha256: 55ef35dd8481e97d7ec005215f479a6cdd577793d38fcf6683521be1e3107dbb

Contents?: true

Size: 1.22 KB

Versions: 45

Compression:

Stored size: 1.22 KB

Contents

//! Tests for reverse-string
//!
//! Generated by [script][script] using [canonical data][canonical-data]
//!
//! [script]: https://github.com/exercism/rust/blob/master/bin/init_exercise.py
//! [canonical-data]: https://raw.githubusercontent.com/exercism/problem-specifications/master/exercises/reverse-string/canonical_data.json


extern crate reverse_string;
use reverse_string::*;

/// Process a single test case for the property `reverse`
fn process_reverse_case(input: &str, expected: &str) {
    assert_eq!(
        &reverse(input),
        expected
    )
}


#[test]
/// empty string
fn test_empty_string() {
    process_reverse_case("", "");
}


#[test]
#[ignore]
/// a word
fn test_a_word() {
    process_reverse_case("robot", "tobor");
}


#[test]
#[ignore]
/// a capitalized word
fn test_a_capitalized_word() {
    process_reverse_case("Ramen", "nemaR");
}


#[test]
#[ignore]
/// a sentence with punctuation
fn test_a_sentence_with_punctuation() {
    process_reverse_case("I'm hungry!", "!yrgnuh m'I");
}


#[test]
#[ignore]
/// a palindrome
fn test_a_palindrome() {
    process_reverse_case("racecar", "racecar");
}

#[test]
#[ignore]
/// wide characters
fn test_wide_characters() {
    process_reverse_case("子猫", "猫子");
}

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
trackler-2.2.1.150 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.149 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.148 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.147 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.146 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.145 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.144 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.143 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.142 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.141 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.140 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.139 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.138 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.137 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.136 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.135 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.134 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.133 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.132 tracks/rust/exercises/reverse-string/tests/reverse-string.rs
trackler-2.2.1.131 tracks/rust/exercises/reverse-string/tests/reverse-string.rs