Add tests.h and PASS/FAIL defines.

DRYs up the tests a bit.