Sha256: e61198fdcd6cefa61ccb5b50403dcf016a3a587c466fba86637708c347b7e02c

Contents?: true

Size: 1.04 KB

Versions: 227

Compression:

Stored size: 1.04 KB

Contents

extern crate scrabble_score;

use scrabble_score::*;

#[test]
fn a_is_worth_one_point() {
    assert_eq!(score("a"), 1);
}

#[test]
#[ignore]
fn scoring_is_case_insensitive() {
    assert_eq!(score("A"), 1);
}

#[test]
#[ignore]
fn f_is_worth_four() {
    assert_eq!(score("f"), 4);
}

#[test]
#[ignore]
fn two_one_point_letters_make_a_two_point_word() {
    assert_eq!(score("at"), 2);
}

#[test]
#[ignore]
fn three_letter_word() {
    assert_eq!(score("zoo"), 12);
}

#[test]
#[ignore]
fn medium_word() {
    assert_eq!(score("street"), 6);
}

#[test]
#[ignore]
fn longer_words_with_valuable_letters() {
    assert_eq!(score("quirky"), 22);
}

#[test]
#[ignore]
fn long_mixed_case_word() {
    assert_eq!(score("OxyphenButazone"), 41);
}

#[test]
#[ignore]
fn non_english_scrabble_letters_do_not_score() {
    assert_eq!(score("pinata"), 8);
    assert_eq!(score("piƱata"), 7);
}

#[test]
#[ignore]
fn empty_words_are_worth_zero() {
    assert_eq!(score(""), 0);
}

#[test]
#[ignore]
fn all_letters_work() {
    assert_eq!(score("abcdefghijklmnopqrstuvwxyz"), 87);
}

Version data entries

227 entries across 227 versions & 1 rubygems

Version Path
trackler-2.2.1.11 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.10 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.9 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.8 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.7 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.6 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.5 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.4 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.3 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.2 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.1 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.1.0 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.6 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.5 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.4 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.3 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.2 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.1 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.2.0.0 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs
trackler-2.1.0.55 tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs