add a test for function definition