Sha256: bc952504f37efe14833d0531893b9c5557b058bbf291da4ca0cf13e17e80dfbd

Contents?: true

Size: 827 Bytes

Versions: 65

Compression:

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

65 entries across 65 versions & 1 rubygems

Version Path
trackler-2.0.8.54 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.53 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.52 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.51 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.50 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.49 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.48 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.47 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.46 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.45 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.44 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.43 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.42 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.41 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.40 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.39 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.38 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.37 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.36 tracks/pony/exercises/rna-transcription/test.pony
trackler-2.0.8.35 tracks/pony/exercises/rna-transcription/test.pony