Sha256: 05759e24d80f0f77f620ab691ab00826d369a5f7eceb3bdf2451b894bbcda07d
Contents?: true
Size: 1.78 KB
Versions: 219
Compression:
Stored size: 1.78 KB
Contents
import org.scalatest.{Matchers, FlatSpec} class MinesweeperTest extends FlatSpec with Matchers { it should "handle zero size board" in { Minesweeper.annotate(List.empty) should equal(List.empty) } it should "handle empty board" in { pending Minesweeper.annotate(List(" ", " ", " ")) should equal(List(" ", " ", " ")) } it should "handle board full of mines" in { pending Minesweeper.annotate(List("***", "***", "***")) should equal(List("***", "***", "***")) } it should "handle surrounded" in { pending Minesweeper.annotate(List("***", "* *", "***")) should equal(List("***", "*8*", "***")) } it should "handle horizontal line" in { pending Minesweeper.annotate(List(" * * ")) should equal(List("1*2*1")) } it should "handle vertical line" in { pending Minesweeper.annotate(List(" ", "*", " ", "*", " ")) should equal(List("1", "*", "2", "*", "1")) } it should "handle cross" in { pending Minesweeper.annotate(List(" * ", " * ", "*****", " * ", " * ")) should equal(List(" 2*2 ", "25*52", "*****", "25*52", " 2*2 ")) } }
Version data entries
219 entries across 219 versions & 1 rubygems