Sha256: 70172607637f34db0bf1f388af37ffedca911cbab53f7219b504d84bf751d45b

Contents?: true

Size: 625 Bytes

Versions: 49

Compression:

Stored size: 625 Bytes

Contents

using Base.Test

include("nucleotide-count.jl")

@testset "empty strand" begin
    @test count_nucleotides("") == Dict('A' => 0, 'C' => 0, 'G' => 0, 'T' => 0)
end

@testset "strand with repeated nucleotide" begin
    @test count_nucleotides("GGGGGGG") == Dict('A' => 0, 'C' => 0, 'G' => 7, 'T' => 0)
end

@testset "strand with multiple nucleotides" begin
    @test count_nucleotides("AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") == Dict('A' => 20, 'C' => 12, 'G' => 17, 'T' => 21)
end

@testset "strand with invalid nucleotides" begin
    @test_throws DomainError count_nucleotides("AGXXACT")
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.179 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.178 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.177 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.176 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.175 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.174 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.173 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.172 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.171 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.170 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.169 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.167 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.166 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.165 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.164 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.163 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.162 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.161 tracks/julia/exercises/nucleotide-count/runtests.jl
trackler-2.2.1.160 tracks/julia/exercises/nucleotide-count/runtests.jl