Sha256: 6dc4275020f84da3d50b607ccf7e966f71acf11fba681cffe9603af7a63e7ddd

Contents?: true

Size: 866 Bytes

Versions: 68

Compression:

Stored size: 866 Bytes

Contents

open Base
open OUnit2

let char_of_variant = function
  | `A -> 'A' | `C -> 'C' | `G -> 'G' | `T -> 'T' | `U -> 'U'
let printer l = List.map ~f:char_of_variant l |> String.of_char_list
let ae exp got _test_ctxt = assert_equal ~printer exp got

let tests =
  ["transcribes empty list">::
    ae [] (Rna_transcription.to_rna []);
   "transcribes cytidine">::
    ae [`G] (Rna_transcription.to_rna [`C]);
   "transcribes guanosine">::
    ae [`C] (Rna_transcription.to_rna [`G]);
   "transcribes adenosie">::
    ae [`U] (Rna_transcription.to_rna [`A]);
   "transcribes thymidine">::
    ae [`A] (Rna_transcription.to_rna [`T]);
   "transcribes multiple">::
    ae [`U; `G; `C; `A; `C; `C; `A; `G; `A; `A; `U; `U]
       (Rna_transcription.to_rna [`A; `C; `G; `T; `G; `G; `T; `C; `T; `T; `A; `A])
  ]

let () =
  run_test_tt_main ("rna-transcription tests" >::: tests)

Version data entries

68 entries across 68 versions & 1 rubygems

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