Learning by Passing Tests, with Application to Neural Architecture Search