put require testing into separate function; call it explicitly from xctests