Sha256: 83b8850dc9cdd9f5279217e2e521f654ec67fef66215ec0363cc30d4627da359

Contents?: true

Size: 828 Bytes

Versions: 165

Compression:

Stored size: 828 Bytes

Contents

use "ponytest"

actor Main is TestList
  new create(env: Env) =>
    PonyTest(env, this)

  fun tag tests(test: PonyTest) =>
    test(_TestRNATrancription)

class iso _TestRNATrancription is UnitTest
  fun name(): String => "rna-transcription/ToRNA"

  fun apply(h: TestHelper) ? =>
    let tests = [
      // rna complement of cytosine is guanine
      ("C", "G")
      // rna complement of guanine is cytosine
      ("G", "C")
      // rna complement of thymine is adenine
      ("T", "A")
      // rna complement of adenine is uracil
      ("A", "U")
      // rna complement
      ("ACGTGGTCTTAA", "UGCACCAGAAUU")
    ]

    for (input, expected) in tests.values() do
      h.assert_eq[String](ToRNA(input)?, expected)
    end

    h.assert_error({() ? => ToRNA("U")? })
    h.assert_error({() ? => ToRNA("ACGTXXXCTTAA")? })

Version data entries

165 entries across 165 versions & 1 rubygems

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