Sha256: 32199851810238c8254c7d9ba9c517d42c65dd12f839dfda291885e4f01bfafe
Contents?: true
Size: 1.25 KB
Versions: 326
Compression:
Stored size: 1.25 KB
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("minesweeper.exs", __DIR__) end ExUnit.start ExUnit.configure exclude: :pending, trace: true defmodule MinesweeperTest do use ExUnit.Case defp clean(b), do: Enum.map(b, &String.replace(&1, ~r/[^*]/, " ")) # @tag :pending test "zero size board" do b = [] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "empty board" do b = [" ", " ", " "] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "board full of mines" do b = ["***", "***", "***"] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "surrounded" do b = ["***", "*8*", "***"] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "horizontal line" do b = ["1*2*1"] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "vertical line" do b = ["1", "*", "2", "*", "1"] assert Minesweeper.annotate(clean(b)) == b end @tag :pending test "cross" do b = [" 2*2 ", "25*52", "*****", "25*52", " 2*2 "] assert Minesweeper.annotate(clean(b)) == b end end
Version data entries
326 entries across 326 versions & 1 rubygems