`vapply()` would be safer here (and then you could remove the check for non-zero tests.