Sha256: ff757afb5cae3b19b31a93b79956e3b9c471c25f05baff7d69378122c37314c5

Contents?: true

Size: 823 Bytes

Versions: 70

Compression:

Stored size: 823 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

70 entries across 70 versions & 1 rubygems

Version Path
trackler-2.1.0.8 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.7 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.6 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.5 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.4 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.3 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.2 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.1 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.1.0.0 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.55 tracks/pony/exercises/rna-transcription/test.pony