Extract external test/bench to src/test.rs