Sha256: ec225f98ea6da6b8124ad537afec860b54e051eeaaa376df101a8bfbce14d788

Contents?: true

Size: 979 Bytes

Versions: 311

Compression:

Stored size: 979 Bytes

Contents

using Base.Test

include("rna-transcription.jl")

@testset "basic transformations" begin
    @testset "rna complement of cytosine is guanine" begin
      @test to_rna("C") == "G"
    end

    @testset "rna complement of guanine is cytosine" begin
      @test to_rna("G") == "C"
    end

    @testset "rna complement of thymine is adenine" begin
      @test to_rna("T") == "A"
    end

    @testset "rna complement of adenine is uracil" begin
      @test to_rna("A") == "U"
    end
end

@testset "rna complement" begin
    @test to_rna("ACGTGGTCTTAA") == "UGCACCAGAAUU"
end

@testset "error handling" begin
    @testset "dna correctly handles invalid input" begin
      @test_throws ErrorException to_rna("U")
    end

    @testset "dna correctly handles completely invalid input" begin
      @test_throws ErrorException to_rna("XXX")
    end

    @testset "dna correctly handles partially invalid input" begin
      @test_throws ErrorException to_rna("ACGTXXXCTTAA")
    end
end

Version data entries

311 entries across 311 versions & 1 rubygems

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