Sha256: 5762dc3995c41b2a41fc2131e9d6330448630793475fabe07fa36f589337807f

Contents?: true

Size: 891 Bytes

Versions: 2

Compression:

Stored size: 891 Bytes

Contents

using Base.Test

include("scrabble-score.jl")

@testset "lowercase letter" begin
  @test score("a") == 1
end

@testset "uppercase letter" begin
  @test score("A") == 1
end

@testset "valuable letter" begin
  @test score("f") == 4
end

@testset "short word" begin
  @test score("at") == 2
end

@testset "short, valuable word" begin
  @test score("zoo") == 12
end

@testset "medium word" begin
  @test score("street") == 6
end

@testset "medium, valuable word" begin
  @test score("quirky") == 22
end

@testset "long, mixed-case word" begin
  @test score("OxyphenButazone") == 41
end

@testset "english-like word" begin
  @test score("pinata") == 8
end

@testset "non-english letter is not scored" begin
  @test score("piƱata") == 7
end

@testset "empty input" begin
  @test score("") == 0
end

@testset "entire alphabet available" begin
  @test score("abcdefghijklmnopqrstuvwxyz") == 87
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trackler-2.0.6.29 tracks/julia/exercises/scrabble-score/runtests.jl
trackler-2.0.6.28 tracks/julia/exercises/scrabble-score/runtests.jl