Sha256: 45e2459919cc925f9da770c8285ec4692563e35e519ea205fb90184b34ca16ff

Contents?: true

Size: 1.38 KB

Versions: 114

Compression:

Stored size: 1.38 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")
        , skip <|
            test "uppercase letter" <|
                \() -> Expect.equal 1 (scoreWord "A")
        , skip <|
            test "valuable letter" <|
                \() -> Expect.equal 4 (scoreWord "f")
        , skip <|
            test "short word" <|
                \() -> Expect.equal 2 (scoreWord "at")
        , skip <|
            test "short, valuable word" <|
                \() -> Expect.equal 12 (scoreWord "zoo")
        , skip <|
            test "medium word" <|
                \() -> Expect.equal 6 (scoreWord "street")
        , skip <|
            test "medium, valuable word" <|
                \() -> Expect.equal 22 (scoreWord "quirky")
        , skip <|
            test "long, mixed-case word" <|
                \() -> Expect.equal 41 (scoreWord "OxyphenButazone")
        , skip <|
            test "english-like word" <|
                \() -> Expect.equal 8 (scoreWord "pinata")
        , skip <|
            test "non-english letter is not scored" <|
                \() -> Expect.equal 7 (scoreWord "piƱata")
        , skip <|
            test "empty input" <|
                \() -> Expect.equal 0 (scoreWord "")
        ]

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
trackler-2.2.1.104 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.103 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.102 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.101 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.100 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.99 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.98 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.97 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.96 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.95 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.94 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.93 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.92 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.91 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.90 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.89 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.88 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.87 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.86 tracks/elm/exercises/scrabble-score/tests/Tests.elm
trackler-2.2.1.85 tracks/elm/exercises/scrabble-score/tests/Tests.elm