Sha256: 6cceef01e3c8c0c1b125a49ddcd74d02bf31178d05c8be7b808a027bda044dd5

Contents?: true

Size: 659 Bytes

Versions: 149

Compression:

Stored size: 659 Bytes

Contents

open Core
open OUnit2
open Minesweeper

let format_board strings =
  let width = match strings with
    | [] -> 0
    | (s::_) -> String.length s in
  let border_line = "+" ^ String.make width '-' ^ "+\n" in
  let line s = "|" ^ s ^ "|\n" in
  "\n" ^ border_line ^ String.concat (List.map strings ~f:line) ^ border_line

(* Assert Equals *)
let ae exp got =
  assert_equal exp got ~cmp:(List.equal ~equal:String.equal) ~printer:format_board

let tests = [
(* TEST
  "$description" >:: (fun _ ->
    let b = $input in
    let expected = $expected in
    ae expected (annotate b)
  );
END TEST *)
]

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

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
trackler-2.2.1.108 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.107 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.106 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.105 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.104 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.103 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.102 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.101 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.100 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.99 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.98 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.97 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.96 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.95 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.94 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.93 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.92 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.91 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.90 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml
trackler-2.2.1.89 tracks/ocaml/tools/test-generator/templates/ocaml/minesweeper/test.ml