module TestGrid where

import Test.QuickCheck
import Data.Maybe
import SudokuCore

tests :: [(String, IO ())]
tests = [("SudokuCore.setCell", quickCheck test)]

test = isJust testGrid

testGrid :: Maybe Grid
testGrid =
  setCell (Just 7) (1,1) emptyGrid
  >>= setCell (Just 3) (7,1)
  >>= setCell (Just 7) (4,2)
  >>= setCell (Just 1) (5,2)
  >>= setCell (Just 4) (2,3)
  >>= setCell (Just 8) (4,3)
  >>= setCell (Just 5) (5,3)
  >>= setCell (Just 9) (8,3)
  >>= setCell (Just 2) (9,3)
  >>= setCell (Just 9) (1,4)
  >>= setCell (Just 6) (9,4)
  >>= setCell (Just 6) (1,5)
  >>= setCell (Just 3) (4,5)
  >>= setCell (Just 4) (6,5)
  >>= setCell (Just 5) (9,5)
  >>= setCell (Just 1) (1,6)
  >>= setCell (Just 4) (9,6)
  >>= setCell (Just 8) (1,7)
  >>= setCell (Just 9) (2,7)
  >>= setCell (Just 4) (5,7)
  >>= setCell (Just 7) (6,7)
  >>= setCell (Just 5) (8,7)
  >>= setCell (Just 6) (5,8)
  >>= setCell (Just 2) (6,8)
  >>= setCell (Just 2) (3,9)
  >>= setCell (Just 9) (9,9)
