Move more boilerplate code to tests/macros.rs to make tests/test.rs simpler.