Sha256: f69822cd2f0964a7f609997357096cf4962ee1a5df83dd6466fbcad445ad66c6
Contents?: true
Size: 1.06 KB
Versions: 213
Compression:
Stored size: 1.06 KB
Contents
module Test.Main where import Prelude import Test.Unit.Assert as Assert import Control.Monad.Eff (Eff) import ScrabbleScore (scoreWord) import Test.Unit (suite, test) import Test.Unit.Main (runTest) main :: Eff _ Unit main = runTest do suite "ScrabbleScore.scoreWord" do test "lowercase letter" do Assert.equal 1 (scoreWord "a") test "uppercase letter" do Assert.equal 1 (scoreWord "A") test "valuable letter" do Assert.equal 4 (scoreWord "f") test "short word" do Assert.equal 2 (scoreWord "at") test "short, valuable word" do Assert.equal 12 (scoreWord "zoo") test "medium word" do Assert.equal 6 (scoreWord "street") test "medium, valuable word" do Assert.equal 22 (scoreWord "quirky") test "long, mixed-case word" do Assert.equal 41 (scoreWord "OxyphenButazone") test "english-like word" do Assert.equal 8 (scoreWord "pinata") test "non-english letter is not scored" do Assert.equal 7 (scoreWord "piƱata") test "empty input" do Assert.equal 0 (scoreWord "")
Version data entries
213 entries across 213 versions & 1 rubygems