Sha256: fc61bf1612f26432c25212749c12e834569fc8fa562f0e1d59a48cb6f9078392

Contents?: true

Size: 1.22 KB

Versions: 396

Compression:

Stored size: 1.22 KB

Contents

#lang racket/base

(module+ test
  (require "scrabble-score.rkt")

  (require rackunit rackunit/text-ui)

  (define suite
    (test-suite
     "scrabble tests"

     (test-eqv? "a is worth one point"
                (score "a")
                1)

     (test-eqv? "scoring is case insensitive"
                (score "A")
                1)

     (test-eqv? "f is worth four"
                (score "f")
                4)

     (test-eqv? "two one point letters make a two point word"
                (score "at")
                2)

     (test-eqv? "three letter word"
                (score "zoo")
                12)

     (test-eqv? "medium word"
                (score "street")
                6)

     (test-eqv? "longer words with valuable letters"
                (score "quirky")
                22)

     (test-eqv? "long mixed case word"
                (score "OxyphenButazone")
                41)

     (test-eqv? "english scrabble letters score"
                (score "pinata")
                8)

     (test-eqv? "non english scrabble letters do not score"
                (score "piƱata")
                7)

     (test-eqv? "empty words are worth zero"
                (score "")
                0)

     ))

  (run-tests suite))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.179 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.178 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.177 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.176 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.175 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.174 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.173 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.172 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.171 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.170 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.169 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.167 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.166 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.165 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.164 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.163 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.162 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.161 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt
trackler-2.2.1.160 tracks/racket/exercises/scrabble-score/scrabble-score-test.rkt