Sha256: d9fea8afb50dea09d5493444b0dd428830b680cfe989695426f1ce8942c2ed9d

Contents?: true

Size: 866 Bytes

Versions: 151

Compression:

Stored size: 866 Bytes

Contents

open Core
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

151 entries across 151 versions & 1 rubygems

Version Path
trackler-2.2.1.110 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.109 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.108 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.107 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.106 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.105 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.104 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.103 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.102 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.101 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.100 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.99 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.98 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.97 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.96 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.95 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.94 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.93 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.92 tracks/ocaml/exercises/rna-transcription/test.ml
trackler-2.2.1.91 tracks/ocaml/exercises/rna-transcription/test.ml