Skip to content

Commit

Permalink
Update tests for scrabble-score
Browse files Browse the repository at this point in the history
Resolves #264.

Implements both of @dexterlemmer's proposals.
  • Loading branch information
coriolinus committed Jan 15, 2018
1 parent 8ba3021 commit e236762
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions exercises/scrabble-score/tests/scrabble-score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ fn long_mixed_case_word() {
#[test]
#[ignore]
fn non_english_scrabble_letters_do_not_score() {
assert_eq!(score("pinata"), 8);
assert_eq!(score("piñata"), 7);
assert_eq!(score("pinata"), 8, "'n' should score 1");
assert_eq!(score("piñata"), 7, "'ñ' should score 0");
}

#[test]
Expand All @@ -67,3 +67,10 @@ fn empty_words_are_worth_zero() {
fn all_letters_work() {
assert_eq!(score("abcdefghijklmnopqrstuvwxyz"), 87);
}

#[test]
#[ignore]
fn german_letters_do_not_score() {
assert_eq!(score("STRASSE"), 7, "\"SS\" should score 2.");
assert_eq!(score("STRAßE"), 5, "'ß' should score 0");
}

0 comments on commit e236762

Please sign in to comment.