Sha256: f6b4ca739098008cb0c496450b573bc5f997ef3643b3db0957f4aee6d9f23e23

Contents?: true

Size: 1.15 KB

Versions: 29

Compression:

Stored size: 1.15 KB

Contents

module Tests exposing (..)

import Test exposing (..)
import Expect
import ScrabbleScore exposing (scoreWord)


tests : Test
tests =
    describe "Grains"
        [ test "lowercase letter" <|
            \() -> Expect.equal 1 (scoreWord "a")
        , test "uppercase letter" <|
            \() -> Expect.equal 1 (scoreWord "A")
        , test "valuable letter" <|
            \() -> Expect.equal 4 (scoreWord "f")
        , test "short word" <|
            \() -> Expect.equal 2 (scoreWord "at")
        , test "short, valuable word" <|
            \() -> Expect.equal 12 (scoreWord "zoo")
        , test "medium word" <|
            \() -> Expect.equal 6 (scoreWord "street")
        , test "medium, valuable word" <|
            \() -> Expect.equal 22 (scoreWord "quirky")
        , test "long, mixed-case word" <|
            \() -> Expect.equal 41 (scoreWord "OxyphenButazone")
        , test "english-like word" <|
            \() -> Expect.equal 8 (scoreWord "pinata")
        , test "non-english letter is not scored" <|
            \() -> Expect.equal 7 (scoreWord "piƱata")
        , test "empty input" <|
            \() -> Expect.equal 0 (scoreWord "")
        ]

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.52 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.51 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.50 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.49 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.48 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.47 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.46 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.45 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.44 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.43 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.42 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.41 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.40 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.39 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.38 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.37 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.36 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.34 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.1.0.33 tracks/elm/exercises/scrabble-score/tests/Tests.elm