module Snake.Tests.M03Rules open Expecto open Snake open Snake.Tests.Fixtures [] let tests = testList "M03 Rules" [ yield! fixtureTests "m03-move" "move" (fun c -> Expect.equal (Rules.move (point (arg 0 c)) (direction (arg 1 c))) (point (expected c)) "move") yield! fixtureTests "m03-in-bounds" "inBounds" (fun c -> Expect.equal (Rules.inBounds (gameState (arg 0 c)) (point (arg 1 c))) (bool (expected c)) "inBounds") yield! fixtureTests "m03-turn" "turn" (fun c -> Expect.equal (Rules.turn (gameState (arg 0 c)) (direction (arg 1 c))) (gameState (expected c)) "turn") yield! fixtureTests "m03-advance" "advance" (fun c -> Expect.equal (Rules.advance (gameState (arg 0 c))) (gameState (expected c)) "advance") ]