Set up automatic tests

Check is used as a unit testing framework.