function define test case