tracks/ocaml/tools/test-generator/templates/ocaml/beer-song/test.ml in trackler-2.2.1.116 vs tracks/ocaml/tools/test-generator/templates/ocaml/beer-song/test.ml in trackler-2.2.1.117
- old
+ new
@@ -1,6 +1,6 @@
-open Core
+open Base
open OUnit2
open Beer_song
let zip s1 s2 =
let rec go s1 s2 acc = match (s1,s2) with
@@ -10,17 +10,17 @@
let find_diffs s1 s2 =
let s1 = String.to_list s1 in
let s2 = String.to_list s2 in
let both = zip s1 s2 in
- List.find_mapi both ~f:(fun i (c1, c2) -> if c1 = c2 then None else Some (sprintf "Diff at index %d: %c <> %c" i c1 c2))
+ List.find_mapi both ~f:(fun i (c1, c2) -> if Char.(c1 = c2) then None else Some (Printf.sprintf "Diff at index %d: %c <> %c" i c1 c2))
let diff_message s1 s2 = match find_diffs s1 s2 with
| None -> if String.length s1 = String.length s2 then "" else "Lengths of expected and actual differ but have a common prefix."
| Some m -> m
let ae exp got _test_ctxt =
- if exp = got
+ if String.(exp = got)
then ()
else failwith @@ "Expected differs from actual: " ^ (diff_message exp got)
let (* SUITE verse *)verse_tests = [
(* TEST