add test_case decorator and function test cases