Sha256: b54260334eb96749c8d1adcc1161ec2b26162761afe04029b481a031a3783585

Contents?: true

Size: 663 Bytes

Versions: 63

Compression:

Stored size: 663 Bytes

Contents

open Base
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 = $minefield in
    let expected = $expected in
    ae expected (annotate b)
  );
END TEST *)
]

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