Sha256: 671b7b559136ad728ab487c6b64fb713b73a2e835187c74bfd1551cf94247bf4

Contents?: true

Size: 630 Bytes

Versions: 58

Compression:

Stored size: 630 Bytes

Contents

open Core.Std
open OUnit2

let printer n =
  Option.sexp_of_t Int.sexp_of_t n
  |> Sexp.to_string

let ae exp got _test_ctxt = assert_equal ~printer exp got

let dna_of_string s =
  let open Hamming in
  let f = function
    | 'A' -> A
    | 'C' -> C
    | 'G' -> G
    | 'T' -> T
    | _   -> failwith "Big news! New nucleotide discovered" in
  String.to_list s |> List.map ~f

let hamdist a b = Hamming.hamming_distance (dna_of_string a) (dna_of_string b)

let tests = [
(* TEST
   "$description" >::
      ae $expected (hamdist "$strand1" "$strand2");
   END TEST *)
]

let () =
  run_test_tt_main ("hamming tests" >::: tests)

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
trackler-2.0.6.30 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.29 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.28 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.27 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.26 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.25 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.24 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.23 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.22 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.21 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.20 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.19 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.18 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.17 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.16 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.15 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.14 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.13 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.12 tracks/ocaml/tools/test-generator/templates/hamming/template.ml
trackler-2.0.6.11 tracks/ocaml/tools/test-generator/templates/hamming/template.ml