Sha256: 87802fb7a9915358a6b47ffde4968502415b78ba3dfade07f2f0800411c4dbea

Contents?: true

Size: 602 Bytes

Versions: 63

Compression:

Stored size: 602 Bytes

Contents

open Base
open OUnit2
open Hamming

let printer = function
| None -> "None"
| Some x -> Int.to_string x

let ae exp got _test_ctxt = assert_equal ~printer exp got

let dna_of_string s =
  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_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

63 entries across 63 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.138 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.137 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.136 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.135 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.134 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.133 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.132 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.131 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.130 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.129 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.128 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.127 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.126 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.125 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.124 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.123 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.122 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.121 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.120 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml