add tests, add 'check' target which builds and then runs tests