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.180 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.179 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.178 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.177 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.176 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.175 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.174 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.173 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.172 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.171 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.170 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.169 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.167 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.166 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.165 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.164 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.163 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.162 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.161 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml
trackler-2.2.1.160 tracks/ocaml/tools/test-generator/templates/ocaml/hamming/test.ml