Sha256: a6500d621c7495142563ca68316ae2977e5aa7b680f8416db3344f4807c69476

Contents?: true

Size: 821 Bytes

Versions: 33

Compression:

Stored size: 821 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"

  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

33 entries across 33 versions & 1 rubygems

Version Path
trackler-2.0.6.33 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.32 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.31 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.30 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.29 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.28 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.27 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.26 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.25 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.24 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.23 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.22 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.21 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.20 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.19 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.18 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.17 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.16 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.15 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.6.14 tracks/pony/exercises/rna-transcription/test.pony