Sha256: 9b2f263dbae3eb5e3b1bc19c9f483a5b821a4af9ee0c3379642556c99aa0d598
Contents?: true
Size: 1.68 KB
Versions: 357
Compression:
Stored size: 1.68 KB
Contents
(ns minesweeper-test (:require [clojure.test :refer [deftest is]] [clojure.string :refer [join]] [minesweeper :refer [draw]])) (deftest zero-size-board (is (= (draw "") ""))) (deftest empty-board (is (= (draw (join \newline [" " " " " "])) (join \newline [" " " " " "])))) (deftest surrounded (is (= (draw (join \newline ["***" "* *" "***"])) (join \newline ["***" "*8*" "***"])))) (deftest board-full-of-mines (is (= (draw (join \newline ["***" "***" "***"])) (join \newline ["***" "***" "***"])))) (deftest horizontal-line (is (= (draw " * * ") "1*2*1"))) (deftest vertical-line (is (= (draw (join \newline [" " "*" " " "*" " "])) (join \newline ["1" "*" "2" "*" "1"])))) (deftest cross (is (= (draw (join \newline [" * " " * " "*****" " * " " * "])) (join \newline [" 2*2 " "25*52" "*****" "25*52" " 2*2 "]))))
Version data entries
357 entries across 357 versions & 1 rubygems