Sha256: de0a249406205ac895373131501f33048c9b8e7bc692ff273b2259452428eca6

Contents?: true

Size: 622 Bytes

Versions: 156

Compression:

Stored size: 622 Bytes

Contents

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

156 entries across 156 versions & 1 rubygems

Version Path
trackler-2.2.1.116 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.115 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.114 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.113 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.111 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.110 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.109 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.108 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.107 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.106 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.105 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.104 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.103 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.102 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.101 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.100 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.99 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.98 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.97 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.96 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml