gen code for some test cases