check and checkmate unit tests