-module(ttt_test). -include_lib("eunit/include/eunit.hrl"). empty_board_test() -> E = ttt:empty_board(), ?assertEqual(E, ttt:empty_board()). moves_board_test() -> B0 = ttt:empty_board(), {ok, B1} = ttt:move(B0, 'X', 0, 0), {ok, B2} = ttt:move(B1, 'X', 0, 1), {ok, B3} = ttt:move(B2, 'X', 0, 2), ?assertEqual(['X', 'X', 'X', 'E', 'E', 'E', 'E', 'E', 'E'], B3). simple_test() -> R = ttt:who_wins(['X', 'X', 'X', 'E', 'E', 'E', 'E', 'E', 'E']), ?assertEqual('X', R).