Test inside function